I'm using mongodb to store datetime.
example
DB data:
[
{
id: 1
date: '2014-11-01T00:00:00.000Z'
},
{
id: 2
date: '2013-10-11T00:00:00.000Z'
},
{
id: 3
date: '2012-11-21T00:00:00.000Z'
}
]
filter by month 11, like query.find({'date': {$month: 11}}) should get result:
[
{
id: 1
date: '2014-11-01T00:00:00.000Z'
},
{
id: 3
date: '2012-11-21T00:00:00.000Z'
}
]
How to do that query to get what I want?
I search and got Query Mongodb on month, day, year... of a datetime, but it's not that I want, I don't want to filter the year of date.