The following table lists the available conversion functions, and a description of their purpose.
Function | Description |
---|---|
NUMTODSINTERVAL | Converts numeric_value into an INTERVAL DAY(4) TO SECOND(6) value. |
NUMTOYMINTERVAL | Converts numeric_value into an INTERVAL YEAR(4) TO MONTH value. |
TO_CHAR | Converts numeric_expr to a character string. |
TO_DATE | Converts string_expr to a DATE data type. TO_DATE does not convert data to any of the other datetime data types. Do not use the TO_DATE function with a DATE value for string_expr. The first two digits of the returned DATE value can differ from the original string_expr depending on format_arg or the default date format. |
TO_NUMBER | Converts string_expr to a NUMBER data type. |
TO_TIMESTAMP | Converts string_expr or integer_expr to a TIMESTAMP data type. |
TO_TIMESTAMP_TZ | Converts string_expr to a TIMESTAMP WITH TIME ZONE data type. |
TO_DSINTERVAL | Converts string_value specified as either of the following:
into an INTERVAL DAY(4) TO SECOND(6) value. Any value that overflows the INTERVAL DAY(4) TO SECOND(6) value results in an error. |
TO_YMINTERVAL | Converts string_value specified as either:
into an INTERVAL YEAR(4) TO MONTH value. Any value that overflows the INTERVAL(4) YEAR TO MONTH value results in an error. |
See the Teradata Database SQL Functions, Operators, Expressions, and Predicates document, B035-1145, for a detailed overview of these conversion functions.