What is the best way to format a date in JSON for Mongo DB storage
- by Poul
I have a date with a time. I'm using ruby, but the language shouldn't matter.
d = "2010-04-01 13:00:00"
What is the best way to format this date for Mongo DB? By 'best' I mean, is there a certain format I could use where Mongo would recognize it as a date and might give me more-advanced filtering optons?
ie: If formatted correctly, could I ask Mongo to return all records whose month is '04'?
Thanks!