> ## Documentation Index
> Fetch the complete documentation index at: /documents/llms.txt
> Use this file to discover all available pages before exploring further.

# to_days

> Returns the number of days between a date and 0000-01-01.

Returns the number of days between a date and 0000-01-01.

The `date` parameter must be of the DATE or DATETIME type.

## Syntax

```Haskell theme={null}
INT TO_DAYS(DATETIME date)
```

## Examples

```Plain Text theme={null}
MySQL > select to_days('2007-10-07');
+-----------------------+
| to_days('2007-10-07') |
+-----------------------+
|                733321 |
+-----------------------+
```

## keyword

TO\_DAYS,TO,DAYS


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.