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

# Month

# \$month

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

## Input

* A single date object

## Output

* The month component of the date as an integer (0-11, where 0 is January)

## Examples

### Extract Month from Date

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

Result: `0` (January, which is 0 in 0-11 range)

### Extract Month from Field

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

Result: The month component (0-11) of the event\_date field
