> ## 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.

# Second

# \$second

The `$second` operator extracts the second component from a date object (0-59).

## Input

* A single date object

## Output

* The second component of the date as an integer (0-59)

## Examples

### Extract Second from Date

```json theme={null}
{
  "$second": [
    {
      "$toDate": ["2023-01-15T10:30:45Z"]
    }
  ]
}
```

Result: `45`

### Extract Second from Field

```json theme={null}
{
  "$second": [
    {
      "$input": "event_date"
    }
  ]
}
```

Result: The second component (0-59) of the event\_date field
