Hello MongoDB fellows,
I’m currently developing an app that requires data aggregations based on dates.
We have a small framework and we once decided to store all dates as strings. (UTC in ISO format)
Now, this works fine but when it comes to aggregations on dates, the MongoDB query functions rely on BSON dates.
So my question is actually: what is the best approach?
- Keep using storing the dates as strings in the documents and use the $dateFromString function
- Store the dates as actual dates in the documents because the performance will be much better
Thank you already for all the expertise you can share with this new kid on the blob.