This is my query in mongodb
db.order.find ({\"ublExtensions.ublExtensions.extensionContent.Metadata
.ModificationTime\": \"2012-02-04T01:58:2
Why can't you just use $gt
query and for comparing time you can use Date.now()
and from that Date.now()
you can use previous date, like if current date is "2017-05-16T02:08:48.419+05:30"
then you will write the query
db.collection.find({"createdAt": { $gte : new ISODate("2017-05-15T02:08:48.419+05:30") }})