I have a data like this in mongodb
{
"latitude" : "",
"longitude" : "",
"course" : "",
"battery" : "0",
"imei" : "0",
"altitude" : "F:3.82V",
"mcc" : "07",
"mnc" : "007B",
"lac" : "2A83",
"_id" : ObjectId("4f0eb2c406ab6a9d4d000003"),
"createdAt" : ISODate("2012-01-12T20:15:31Z")
}
How do I query db.gpsdatas.find({'createdAt': ??what here??})
, so that it returns the above data result to me from the db?
Find with a specific date:
Find with greater
gte
or littlelt
:Find by range: