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

# Todate

# \$toDate

The `$toDate` operator parses a string representation of a date into a date object.

## Input

* A single string value containing a date in a standard format

## Output

* A date object representing the parsed date

## Examples

### Parse ISO Date

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

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

### Parse Different Format

```json theme={null}
{
  "$toDate": [
    "2023-01-15"
  ]
}
```

Result: `Date object representing January 15, 2023`

### Field Value

```json theme={null}
{
  "$toDate": [
    {
      "$input": "date_string"
    }
  ]
}
```

Result: A date object representing the date in the date\_string field
