How to retrieve the timestamp from the ObjectID field in mongodb document in java?

696 views Asked by At

I want to query all the documents in a collection to get the timestamp of each document from the ObjectID, as there is no separate createdAt fieldin the documents. How do i structure the query for the same in java?

0

There are 0 answers