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

# Day

# \$day

The `$day` operator extracts the day component from a date object (1-31).

## Input

* A single date object

## Output

* The day component of the date as an integer (1-31)

## Examples

### Extract Day from Date

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

Result: `15`

### Extract Day from Field

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

Result: The day component (1-31) of the event\_date field
