Find objects between two dates MongoDB
Querying for a Date Range (Specific Month or Day) in the MongoDB Cookbook has a very good explanation on the matter, but below is something I tried out myself and it seems to work. items.save({ name: “example”, created_at: ISODate(“2010-04-30T00:00:00.000Z”) }) items.find({ created_at: { $gte: ISODate(“2010-04-29T00:00:00.000Z”), $lt: ISODate(“2010-05-01T00:00:00.000Z”) } }) => { “_id” : ObjectId(“4c0791e2b9ec877893f3363b”), “name” … Read more