1items.save({
2 name: "example",
3 created_at: ISODate("2010-04-30T00:00:00.000Z")
4})
5items.find({
6 created_at: {
7 $gte: ISODate("2010-04-29T00:00:00.000Z"),
8 $lt: ISODate("2010-05-01T00:00:00.000Z")
9 }
10})
11=> { "_id" : ObjectId("4c0791e2b9ec877893f3363b"), "name" : "example", "created_at" : "Sun May 30 2010 00:00:00 GMT+0300 (EEST)" }
12
1#all documents with the price value between 100 and 200
2query = db.collection.find({
3 'price': { '$gt': 100, '$lt': 200}
4})