My date time property defined in my model class named Recommendation is
public DateTime? DueDate { get; set; } I am trying to filter and retrieve data from mongo where the field DueDate matches the current date only not including time.
I made a filter expression for querying on mongo.
var dateFilter = Builders<Recommendation>.Filter.Eq(x => x.DueDate, DateTime.Now) DateTime.Now also returns the date with a timestamp.
Also in mongo, the DueDate field value is 2022-12-08T05:00:00.000+00:00
How can I modify the filter query above to filter and fetch records from mongo based on date only and not timestamp?