I want to fetch record which are equal to some date.
I got many example of $gte, $lte, not for $eq
When I do like this (with $gte),
db.getCollection('apiPerformance').find({CreatedAt : {$gte : new ISODate('2017-05-30')}})
then it is returning records.
But I want get record equal to date ($eq)
db.getCollection('apiPerformance').find({CreatedAt : {$eq : new ISODate('2017-05-30')}})
Then It is not returning any data.
But when I filter with Date with Time
like
db.getCollection('apiPerformance').find({CreatedAt : {$eq : new ISODate('2017-05-30 22:00:00.000Z')}})
then returning data.
Please guide me how to use $eq
in MongoDb
to match with only date.???