> ## Documentation Index
> Fetch the complete documentation index at: https://firebolt-aggregate-helm-docs-pr-97.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Conversion functions

> Snowflake conversion functions supported in Snowflake compatibility mode.

<span className="feature-tag">Preview</span>

Snowflake [conversion functions](https://docs.snowflake.com/en/sql-reference/functions-conversion) in [Snowflake compatibility mode](/reference-sql/snowflake/overview).

Snowflake spells as a function what Firebolt spells as a cast, so these are translated to `CAST`. The `TRY_TO_*` forms become `TRY_CAST` and answer `NULL` where the conversion fails, as they do in Snowflake.

| Function                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | Support          | Notes                                                                                                                                                                                                  |
| :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :--------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`TO_NUMBER`](https://docs.snowflake.com/en/sql-reference/functions/to_decimal), [`TO_DECIMAL`](https://docs.snowflake.com/en/sql-reference/functions/to_decimal), [`TO_NUMERIC`](https://docs.snowflake.com/en/sql-reference/functions/to_decimal)                                                                                                                                                                                                                                                                                               | Supported        | With no precision the result is `NUMBER(38, 0)`, matching Snowflake. The three-argument form names its own precision and scale.                                                                        |
| [`TO_VARCHAR`](https://docs.snowflake.com/en/sql-reference/functions/to_char), [`TO_CHAR`](https://docs.snowflake.com/en/sql-reference/functions/to_char)                                                                                                                                                                                                                                                                                                                                                                                         | Supported        | A format argument is not supported.                                                                                                                                                                    |
| [`TO_DOUBLE`](https://docs.snowflake.com/en/sql-reference/functions/to_double)                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | Supported        |                                                                                                                                                                                                        |
| [`TO_BOOLEAN`](https://docs.snowflake.com/en/sql-reference/functions/to_boolean)                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | Supported        |                                                                                                                                                                                                        |
| [`TO_DATE`](https://docs.snowflake.com/en/sql-reference/functions/to_date)                                                                                                                                                                                                                                                                                                                                                                                                                                                                        | Supported        |                                                                                                                                                                                                        |
| [`TRY_TO_NUMBER`](https://docs.snowflake.com/en/sql-reference/functions/try_to_decimal), [`TRY_TO_DECIMAL`](https://docs.snowflake.com/en/sql-reference/functions/try_to_decimal), [`TRY_TO_NUMERIC`](https://docs.snowflake.com/en/sql-reference/functions/try_to_decimal), [`TRY_TO_DOUBLE`](https://docs.snowflake.com/en/sql-reference/functions/try_to_double), [`TRY_TO_BOOLEAN`](https://docs.snowflake.com/en/sql-reference/functions/try_to_boolean), [`TRY_TO_DATE`](https://docs.snowflake.com/en/sql-reference/functions/try_to_date) | Supported        | Answer `NULL` where the conversion fails.                                                                                                                                                              |
| [`TO_BINARY`](https://docs.snowflake.com/en/sql-reference/functions/to_binary), [`TRY_TO_BINARY`](https://docs.snowflake.com/en/sql-reference/functions/try_to_binary)                                                                                                                                                                                                                                                                                                                                                                            | Not supported    | Snowflake reads the string as `HEX` by default, so `TO_BINARY('61')` is the single byte `0x61`. A cast would give the two bytes of the text `61`, so this is refused rather than answered differently. |
| [`TO_TIMESTAMP`](https://docs.snowflake.com/en/sql-reference/functions/to_timestamp)                                                                                                                                                                                                                                                                                                                                                                                                                                                              | Supported        | See [Date and time](/reference-sql/snowflake/functions/date-and-time).                                                                                                                                 |
| [`TO_GEOGRAPHY`](https://docs.snowflake.com/en/sql-reference/functions/to_geography)                                                                                                                                                                                                                                                                                                                                                                                                                                                              | With limitations | See [Geospatial](/reference-sql/snowflake/functions/geospatial).                                                                                                                                       |
| [`TRY_TO_GEOGRAPHY`](https://docs.snowflake.com/en/sql-reference/functions/try_to_geography), [`TO_GEOMETRY`](https://docs.snowflake.com/en/sql-reference/functions/to_geometry), [`TRY_TO_GEOMETRY`](https://docs.snowflake.com/en/sql-reference/functions/try_to_geometry)                                                                                                                                                                                                                                                                      | Not supported    |                                                                                                                                                                                                        |
| [`TO_XML`](https://docs.snowflake.com/en/sql-reference/functions/to_xml), `TRY_TO_FILE`                                                                                                                                                                                                                                                                                                                                                                                                                                                           | Not supported    |                                                                                                                                                                                                        |
| [`TO_ARRAY`](https://docs.snowflake.com/en/sql-reference/functions/to_array), [`TO_OBJECT`](https://docs.snowflake.com/en/sql-reference/functions/to_object), [`TO_VARIANT`](https://docs.snowflake.com/en/sql-reference/functions/to_variant)                                                                                                                                                                                                                                                                                                    | Not supported    | The semi-structured types are not supported; see [Data types](/reference-sql/snowflake/data-types).                                                                                                    |
