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

# Conversion

> Conversion functions can be used to convert the value of one data type into another data type.

## CAST()

Converts a value of one supported data type into another supported data type.

**Syntax**

```bash theme={null}
CAST(expression AS datatype[(length)])
```

**Parameters**

* **expression** An expression of any supported data type to be converted into a different supported data type.
* **datatype** The data type to which to convert the expression.
* **length** (Optional) The length of the resulting data type.

**Examples**

```bash theme={null}
SELECT CAST ('2024-01-01' AS datetime)
```
