When extracting the day from a date, the exact option we use will depend on how we want the day to be represented.
For example, do we want the day of the week, the day of the month, or the day of the year? Or perhaps we want it in ISO 8601 format? The return value will usually be different depending on which one we choose.
This article explores those options, and therefore presents 8 ways to return the day portion from a date in MongoDB.
Continue reading