I have some documents in MongoDB that has a DateTime field
{"Name" : "a name", "InsertDate" : ISODate("2014-01-23T14:32:11.746Z")}
and I want to get all the document with InsertionDate greater than 2014-01-23 00:00:00.
I tried the following queries but doesn't work:
{"InsertDate": {"$gt":ISODate("2014-01-23T00:00:00Z")} (got Error com.mongodb.util.JSONParseException pointing to ISODate)
{"InsertDate": {"$gt":new Date("2014-01-23T00:00:00Z")} (got Error com.mongodb.util.JSONParseException pointing to new Date)
Some one suggested I should use a syntax like: {"InsertDate": {"$gt":{"$date":"2014-01-23T00:00:00Z"}} but does not produce the results I expect (got no Error from Talend but doesn't retrieve any document (probably this syntax is not supported by Mongo)).
Any suggestions on how to include in query?
I am using TOS for BigData and MongoDB 2.2.3.