Date Filter on MongoDb - OmIndia

Teach To India

Thursday, June 07, 2018

Date Filter on MongoDb

How to Find Data Between Two Date in MongoDB 

MongoDB is a scalable, high-performance, open source, document-oriented NoSQL database. It supports a large number of languages and application development platforms. Questions about server administration can be asked on http://dba.stackexchange.com.

db.getCollection('Sanction.files').find({uploadDate:{$gt:new Date('2018-02-08'),$lt: new Date('2018-02-10')}})


                                             OR

db.getCollection('Sanction.files').find({uploadDate:{$gt:new ISODate('2018-02-08'),$lt: new ISODate('2018-02-10')}})



No comments:

Post a Comment

Comments

Popular