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

# Teradata Functions

## `char2hexint`

Returns the hexadecimal representation of the UTF-16BE encoding of the string.

*Supported Signatures*

```sql theme={null}
function char2hexint(varchar) returns varchar
```

[🔗 Official Documentation](https://trino.io/docs/current/functions/teradata.html#char2hexint)

## `index`

Alias for strpos() function.

*Examples:*

```sql examples.sql theme={null}
SELECT INDEX('abcdefg', 'c') -- value '3'
```

*Supported Signatures*

```sql theme={null}
function index(varchar, varchar) returns bigint
```

[🔗 Official Documentation](https://trino.io/docs/current/functions/teradata.html#index)

## `to_char`

Formats timestamp as a string using format.

*Supported Signatures*

```sql theme={null}
function to_char(timestamp(p), varchar) returns varchar
```

[🔗 Official Documentation](https://trino.io/docs/current/functions/teradata.html#to_char)

## `to_date`

Parses string into a DATE using format.

*Supported Signatures*

```sql theme={null}
function to_date(varchar, varchar) returns date
```

[🔗 Official Documentation](https://trino.io/docs/current/functions/teradata.html#to_date)

## `to_timestamp`

Parses string into a TIMESTAMP using format.

*Supported Signatures*

```sql theme={null}
function to_timestamp(varchar, varchar) returns timestamp
```

[🔗 Official Documentation](https://trino.io/docs/current/functions/teradata.html#to_timestamp)
