I am new to Mongodb. I want to find those objects stored in mongodb whose receivedOn
date is greater than a particular date. My object structure is :
{
"_id" : ObjectId("591313fa79a7f2826cdfcdbd"),
"uuid" : "849cf178-bf19-4a32-bda8-b754551c57f0",
"status" : "SENT",
"receivedOn" : ISODate("2017-05-10T18:51:58.893+05:30"),
"scheduledOn" : ISODate("2017-05-10T18:51:58.893+05:30"),
"deliveredOn" : ISODate("2017-05-10T18:52:02.628+05:30")
}
I am using Jongo driver for querying. My query looks like:
collection.find("{\"receivedOn\": {$gte : #}}", javaDate);
I am getting no results from this query but there are documents in collection which should have been returned. What's wrong with my query?