Answer the question
In order to leave comments, you need to log in
What is the most efficient way to get all documents that are older than 1 day?
I know that it is possible to get its timestamp through the ObjectId of a document. But what if I need to get all the documents in the collection that are older than one day? Walking through each document and checking its ObjectId is not the best option.
Do I understand correctly that when adding to MongoDB, you need to make a field a la created_at?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question