how can I get timestamp using object id in MongoDB.I am using NodeJS and mongoDB as my backend service I want to get the date and time of the document when it is inserted in the collection. This is what i am using :
db.Users.find()._id.getTimestamp()
OUTPUT
ISODate("2018-09-11T11:00:38Z")
Now, what I want to know is:
1) Separate date and time from above string and convert it into readable format.
2) This timestamp returned by MongoDB object id is based on server time or user's computer.
THANKS