I use my document _id client-side as strings. I would love to be able pull the timestamp from this value as you can on the server. Is it possible to recreate this functionality on the client side? (recast as objectid, or create a standalone function to pull this data)
example _id: "4f94c2a11a6bbec3872cb315"
Thanks!
How about this, broken down into steps… unfortunately it’s only second resolution time that gets stored in the ObjectID.
See jsfiddle if you want to test: http://jsfiddle.net/pZdyM/
NOTE: this is kind of kludgy–it depends on the current ObjectID format. They might move the timestamp around within the ObjectID one day, and that would break this.