Query MongoDB documents for a particular date range

Hi devs, I am trying to query documents based on particular date range. So I need all the documents where the createdDate is less than equal to current date and greater than equal to currentDate - 2.
I am assuming that there is some issue in the date format between how mongo db stores and how I am trying to fire that in the query.
Attached the screenshot. Can someone help
image.png
image.png
image.png
Was this page helpful?