MongoDB + nodejs : how to query ISODate fields?
问题 I am using nodejs with the node-mongodb-native driver (http://mongodb.github.io/node-mongodb-native/). I have documents with a date property stored as ISODate type. Through nodejs, I am using this query: db.collection("log").find({ localHitDate: { '$gte': '2013-12-12T16:00:00.000Z', '$lt': '2013-12-12T18:00:00.000Z' } }) It returns nothing. To make it work I need to do the following instead: db.collection("log").find({ localHitDate: { '$gte': ISODate('2013-12-12T16:00:00.000Z'), '$lt':