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

# to_date

> Converts a DATETIME value into a date.

Converts a DATETIME value into a date.

## Syntax

```Haskell theme={null}
DATE TO_DATE(DATETIME datetime)
```

## Examples

```Plain Text theme={null}
MySQL > select to_date("2020-02-02 00:00:00");
+--------------------------------+
| to_date('2020-02-02 00:00:00') |
+--------------------------------+
| 2020-02-02                     |
+--------------------------------+
```

## keyword

TO\_DATE


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