Mongodb query specific month|year not date
How can I query a specific month in mongodb, not date range, I neeed month
to make a list of customer birthday for current month.
In SQL will be something like that:
SELECT * FROM customer WHERE MONTH(bday)='09'
Now I need to translate that in mongodb. Note: My dates are already saved
in MongoDate type, I used this thinking that will be easy to work before
but now I can't find easily how to do this simple thing.
Thanks.
No comments:
Post a Comment