Development MongoDB

what is the best Way to compare dates with MongoDb in asp net core

I have asp net core application with MongoDB.and I’m saving the date in the format of [dd/MM/yyyy]

{"CreatedDate",DateTime.Now.Date.ToString("dd/MM/yyyy") }

whereas CreatedDate is field in the MongoDB .
and i have to compare the saved date with filterDate that i’m sending.
What’s the best way to compare the dates with MongoDB?

Leave an answer

Your email address will not be published. Required fields are marked *