Hi,
Following query is working perfectly in Robomongo--mongo client
db.getCollection('news').find({"datePosted": {"$gte": new Date('2016-03-21'), "$lte": new Date('2016-09-21')}})
. But not working when I use the same in mongoose nodejs.like below..It neither throws error..Just returning empty news object
News.find({"datePosted": {"$gte": new Date('2016-03-21'), "$lte": new Date('2016-09-21')}}).exec(function (err, news) {
}
Please help,
Thanks
Anand