How do I get a timestamp from ObjectId?

  node.js, question

* * I saved an article, the primary key is the default ObjectId, because _id already contains a timestamp, so I didn’t save the time.
The following figure * *
Now there are two questions to ask the great god:

  1. Should I choose to save the timestamp or use _id processing to obtain it?

  2. If it is obtained by using _id, should it be handled in Model, Router or front end?

Thank you all!

Official documents provide a getTimestamp () method. You can try.