- Reference >
- Operators >
- Aggregation Pipeline Operators >
- $add (aggregation)
$add (aggregation)¶
On this page
Definition¶
-
$add
¶ Adds numbers together or adds numbers and a date. If one of the arguments is a date,
$add
treats the other arguments as milliseconds to add to the date.The
$add
expression has the following syntax:The arguments can be any valid expression as long as they resolve to either all numbers or to numbers and a date. For more information on expressions, see Expressions.