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

# to_date

> 从DATETIME类型值中提取日期部分。

返回 DATETIME 类型值中的日期部分。

## 语法

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

## 示例

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


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