I have a huge dataset of documents, but when I got the data, I forgot append a timestamp of the time were created each of them.
How I can use the ObjectID timestamp of each document to append the timestamp when were created for all of them?
Sorry for the initial wrong answer.
That being said, the documentation says for python that, you can get the timestamp in EPOCH time in the first 4 bytes of your objectID.
I read somewhere else (here), that in Javascript, you have a method .getTimestamp()
. You should tell us the language you need in order to get your function, but I guess you got the logic anyway. :)