What error message are you getting?
Does everything work if you comment out the filterByFormula
line?
If you put the filter in a formula field in the user interface, does it show true (1
) for the two records you expect?
You should not need the AND
function in your formula, as you have only one condition.