How do I convert that into a format I can read (i.e. 2/23/2010
21:46:49 - that's from mongo shell).
seems to work, what's the "0.42800000" for?
The other value is believe is microseconds. The MongoDate object
actually has 2 properties ->sec and ->usec
To get a human readable datetime I would do the following:
echo date('h:i:s m/d/y', $aMongoDate->sec);
i.e. just ignore the microseconds part as PHP doesn't handle them that
nicely anyway.
Regards,
Jon
object(MongoDate)#7 (2) {
["sec"]=>
int(1266985090)
["usec"]=>
int(556000)
}
Looks like PHP knows what to do with it if you echo it out.
--
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To post to this group, send email to mongod...@googlegroups.com.
To unsubscribe from this group, send email to mongodb-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.