The date to truncate, specified in UTC. The date can be any expression that resolves to a Date, a Timestamp, or an ObjectID.
The unit of time, specified as an expression that must resolve to one of these strings:
Together, binSize and unit specify the time period used in the $dateTrunc calculation.
The numeric time value, specified as an expression that must resolve to a positive non-zero number. Defaults to 1.
Together, binSize and unit specify the time period used in the $dateTrunc calculation.
The timezone of the operation result.
Used when the unit is equal to week. Defaults to Sunday. The startOfWeek parameter is an expression that resolves to a case insensitive string:
Generated using TypeDoc
Truncates a date.
5.0
https://docs.mongodb.com/manual/reference/operator/aggregation/dateTrunc/#mongodb-expression-exp.-dateTrunc