Mongodb query data between a Date Range
Let say we have a collection called 'users' with the following schema:
{
name:String,
birth_date:Date,
}
We would like to query all persons born from 01-01-1990 to 01-01-1991:
db.users.find({birth_date:{$gte:new Date("01-01-1990"), $lt:new Date("01-01-1991")}})