Joda Time comparaison

18 views
Skip to first unread message

Nicolas Esteban

unread,
Feb 2, 2015, 10:15:17 AM2/2/15
to reacti...@googlegroups.com
Hi,

I'm trying to write a query returning data before a date :

mycollection
      .find(Json.obj("start" -> Json.obj("$gte" -> Json.obj("$date" -> startDate))))
      .cursor[MyModel]
      .collect[List]().map { list =>
         Ok(Json.toJson(list))
 }

syntax seems correct but no model is returned.

I'm using Playframework and this format : jodaDate("yyyyMMddHHmm") to map the both requests of adding and searching.


Any ideas ?


Thanks in advance !

Vijay Kiran

unread,
Feb 3, 2015, 8:07:47 AM2/3/15
to reacti...@googlegroups.com


What do you get when you try with BSONDateTime(startDate.getMillis) or something ?

./Vijay
Reply all
Reply to author
Forward
0 new messages