Here its my mongodb database structure
coordinates : {
lat : {type: Number},
lon : {type: Number},
},
timeStamp :{type: Date} ,
accuracy :{type: Number},
deviceId : {type: Number},
deviceType : {type: String},
simId : {type: String}
I want to find document on date.
here its my query for getting document from mongodb
db.LocationInfoCollection.find({"deviceId":911441051085656,"timeStamp":{$gte:new Date("2015-09-07T12:56:44.000Z")}})
when I'm run above query on mongodb return blank array.
Above query perfectly run on mongo shell. But not in my code.
output on mongo shell
{
"timeStamp": "2015-09-08T12:31:24.000Z",
"accuracy": 5,
"deviceId": 911441051085656,
"simId": "123456",
"_id": "55eed361dfa115387dade3ce",
"coordinates": {
"lat": 20.998,
"lon": 75.5667
}
}
How can I get document on above date query.