OPTIONS

$subtract (aggregation)

$subtract

Takes an array that contains two numbers or two dates and subtracts the second value from the first. With dates, the operator returns the difference in milliseconds.