-
-
Save akotlov/fd19d79a57537c5072721ab47bf0befb to your computer and use it in GitHub Desktop.
Query for a date range using Mongo Timestamps
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
db.Collection.find({ | |
created_at : { | |
'$gte': new Timestamp(new Date(2012, 0, 21), 0), | |
'$lte': new Timestamp(new Date(2012, 0, 22), 0) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment