How would I write a query which checks the createdAt and finds all objects between 01-01-2021and 31-04-2021? I tried the following query, but it didn’t give back the right data(see image):
{createdAt:{$gte:“01-03-2021”,$lt:“31-03-2021”}}
Great! Yeah the dates in your screenshot and in your text didn’t match so I wasn’t sure what range you wanted.
Keep in mind that the query you are using returns data from the beginning of March 1st to the end of March 30th, i.e. it does not cover March 31st at all. Maybe that’s what you want but it seems unlikely. To cover the full month of March you need this: