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

# TO_BOOLEAN

> TO_BOOLEAN in Query Engine SQL.

<Note>
  This function isn't in the updated function reference yet. The details below come from the previous docs, and the product team is confirming them.
</Note>

## Syntax

TO\_BOOLEAN( \<expr> )

Converts and returns the boolean value of the input. For null input, output is also NULL Support datatype: INT/DOUBLE/VARCHAR/BOOLEAN

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
> select to_boolean('1')
true
```

String Conversion

* Strings converted to TRUE: `'true'`, `'t'`, `'yes'`, `'on'`, `'1'`.
* Strings converted to FALSE: `'false'`, `'f'`, `'no'`, `'off'`, `'0'`.
* All other text strings cannot be converted to Boolean values.

Numeric Conversion

* Zero (`0`) is converted to FALSE.
* One (`1`) is converted to TRUE.
* Any non-zero value other than `1` is converted to FALSE.


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