- Reference >
- Operators >
- Aggregation Pipeline Operators >
- Date Aggregation Operators >
- $month (aggregation)
$month (aggregation)¶
On this page
Definition¶
-
$month
¶ Returns the month of a date as a number between 1 and 12.
The
$month
expression has the following syntax:The argument can be any expression as long as it resolves to a date. For more information on expressions, see Expressions.