Groups
Groups
Sign in
Groups
Groups
mongodb-user
Conversations
About
Send feedback
Help
looking for mongo command for timestamp comparison
392 views
Skip to first unread message
Van Phan
unread,
Oct 13, 2011, 2:33:08 PM
10/13/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mongod...@googlegroups.com
For example:
in MySQL:
Select mydate from <tbl_name> where mydate >= <current date>;
Can you help?
thanks.
-van
Brandon Diamond
unread,
Oct 13, 2011, 3:32:52 PM
10/13/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mongodb-user
You can use the $gt, $lt, $gte, $lte, etc operators with timestamps.
Brandon Diamond
unread,
Oct 13, 2011, 3:34:18 PM
10/13/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mongodb-user
To clarify: the "timestamp" BSON type is generally not what you're
looking for. By timestamp, I mean a field containing a Date object:
http://www.mongodb.org/display/DOCS/Dates
On Oct 13, 2:33 pm, Van Phan <
vphan2...@gmail.com
> wrote:
Reply all
Reply to author
Forward
0 new messages