So I need help in trying to understand the following?
In mongo shell, I did this:
> var start = new Date(2011,2,2,8,0,0)
and then start gives me:
> start
ISODate("2011-03-02T16:00:00Z")
What i was expecting to parse was a date variable been created which is of the following type
2nd feb 2011 8 am
in format( yyyy-mm-dd) python format.
I cant understand what happend?
Any suggestions?
Thanks
I really think it is a Javascript Date issue, where your month is actually one number less than the actual month
e.g. February is 1, as noted in the w3c
http://www.w3schools.com/jsref/jsref_getmonth.asp
And about the time, this is a time-zone issue try using
http://www.w3schools.com/jsref/jsref_obj_date.asp
You could get the string by doing