Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • DateToParts

Index

Properties

Properties

$dateToParts: { date: DateExpression; timezone?: tzExpression; iso8601?: boolean }

Returns a document containing the constituent parts of a date.

version

3.6

see

https://docs.mongodb.com/manual/reference/operator/aggregation/dateToParts/#mongodb-expression-exp.-dateToParts

Type declaration

  • date: DateExpression

    The input date for which to return parts. can be any expression that resolves to a Date, a Timestamp, or an ObjectID. For more information on expressions, see Expressions.

  • Optional timezone?: tzExpression

    The timezone of the operation result. must be a valid expression that resolves to a string formatted as either an Olson Timezone Identifier or a UTC Offset. If no timezone is provided, the result is displayed in UTC.

    version

    3.6

  • Optional iso8601?: boolean

    If set to true, modifies the output document to use ISO week date fields. Defaults to false.

Generated using TypeDoc