- Reference >
- Operators >
- Aggregation Pipeline Operators >
- Date Aggregation Operators >
- $hour (aggregation)
$hour (aggregation)¶
On this page
Definition¶
-
$hour
¶ Returns the hour portion of a date as a number between 0 and 23.
The
$hour
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.