Hmm… nothing seems to be wrong with that code. I created a collection with that name and with that date field and then entered various records with dates before and after the two week mark. Only the ones in the last two weeks were returned.
The field type is set correctly (date and time) and the dates are set properly in the collection. But I noticed they are set as MM/DD/YYYY - perhaps it query as DD/MM/YYYY and this could explain why only few dates are not retrieved properly and not all of them?
The “bug” was in what I wrote. What I meant to say in the last sentence was that only those prior to two weeks ago were returned. In other words, I am getting the results that Anatarad was expecting and doesn’t get.
@tony-brunsman I see.
So @anatarad , it worked for Anthony, so the code is fine, and the problem is somewhere else. I don’t think we can help with that.