> ## Documentation Index
> Fetch the complete documentation index at: https://docs.metrics-man.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Addseconds

# \$addSeconds

The `$addSeconds` operator adds a specified number of seconds to a date object.

## Input

* An array containing a date object and a numeric number of seconds to add

## Output

* A new date object with the specified number of seconds added

## Examples

### Add Seconds to Date

```json theme={null}
{
  "$addSeconds": [
    {
      "$toDate": ["2023-01-15T10:30:00Z"]
    },
    90
  ]
}
```

Result: `Date object representing January 15, 2023 at 10:31:30 UTC`

### Add Seconds to Field Value

```json theme={null}
{
  "$addSeconds": [
    {
      "$input": "start_time"
    },
    {
      "$input": "seconds_to_add"
    }
  ]
}
```

Result: A new date with seconds\_to\_add added to the start\_time field
