I would like to do a query based on a MongoDB ISODate field. However, I'm not sure how to serialize a Java Date object into the correct ISODate object, which can then be used with QueryBuilder. A little example code would be greatly appreciated. Thanks a lot.
1 Answer
Serialization of a Date object to the appropriate representation in JSON ({$date:
builder.greaterThan(new Date())
works just fine. Be wary of timezones though.
1 Comment
Lucas
I couldn't get expected result because of another bug. The date serialization part works well actually. In any case, thanks for your quick and insightful reply! :)