Re: Alternative for DATE_SUB

62 views
Skip to first unread message

Stephen Lee

unread,
Oct 10, 2012, 3:21:33 PM10/10/12
to mongod...@googlegroups.com
As is, there aren't date arithmetic operators, so your best bet might be to store your dates as integers (eg. number of milliseconds since the epoch) and use the standard arithmetic operators.

On Wednesday, October 10, 2012 3:23:07 AM UTC-4, Sam wrote:
Is there any alternative method in MongoDB for date_sub in mySql?

                                         

Sumiya Shajahan

unread,
Oct 11, 2012, 1:49:54 AM10/11/12
to mongod...@googlegroups.com
Thanks Stephen for the reply.
Reply all
Reply to author
Forward
0 new messages