The date to convert to string.
The date format specification.
If unspecified, $dateToString uses "%Y-%m-%dT%H:%M:%S.%LZ" as the default format.
Changed in version 4.0: The format field is optional if featureCompatibilityVersion (fCV) is set to "4.0" or greater. For more information on fCV, see setFeatureCompatibilityVersion.
The timezone of the operation result.
The value to return if the date is null or missing. The arguments can be any valid expression.
If unspecified, $dateToString returns null if the date is null or missing.
Changed in version 4.0: Requires featureCompatibilityVersion (fCV) set to "4.0" or greater. For more information on fCV, see setFeatureCompatibilityVersion.
Generated using TypeDoc
Returns the date as a formatted string.
3.6
https://docs.mongodb.com/manual/reference/operator/aggregation/dateToString/#mongodb-expression-exp.-dateToString