我想获取等于某个日期的记录。
I got many example of $gte, $lte, not for $eq
当我这样做时(with $gte),
db.getCollection('apiPerformance').find({CreatedAt : {$gte : new ISODate('2017-05-30')}})
然后它返回记录。
但我想让记录等于约会($eq)
db.getCollection('apiPerformance').find({CreatedAt : {$eq : new ISODate('2017-05-30')}})
然后它没有返回任何数据。
但是当我使用Date with Time
过滤
db.getCollection('apiPerformance').find({CreatedAt : {$eq : new ISODate('2017-05-30 22:00:00.000Z')}})
然后返回数据。
请指导我如何使用$eq
中的MongoDb
来匹配日期。???