Created
September 28, 2016 09:54
-
-
Save kolexinfos/77bbc895a697cc9bdcbc1604f6f343ee to your computer and use it in GitHub Desktop.
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
| var Verify = require('../models/verify'); | |
| var now = new Date(); | |
| now.setDate = (now.getHours() - 1) | |
| Verify.find( //query today up to tonight | |
| {"created_on": {"$gte": now }}) | |
| Throws an error of type mismatch, I also tested and see the that the $lt and $gte takes on Date types. |
Author
Can you use it in the Mongoose Context like in my initial post, I know all this works but I need to check a dateTime field in a mongo collection
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
test with
or