16.20.16.20 - 16.20 - INTERVAL-to-Character Conversion - Teradata Vantage NewSQL Engine

Teradata Vantageā„¢ Data Types and Literals

prodname
Teradata Database
Teradata Vantage NewSQL Engine
vrm_release
16.20
category
Programming Reference
featnum
B035-1143-162K

Purpose

Use CAST syntax or Teradata explicit conversion syntax to convert an INTERVAL type to its canonical character string representation.

INTERVAL-to-Character conversion is supported for CHAR and VARCHAR types only. The target type cannot be CLOB.

CAST Syntax



interval_expression

An INTERVAL expression to be converted.

character_data_type

The data type to which the expression is to be converted.

server_character_set

The server character set to use for the conversion. If the CHARACTER SET clause is omitted, the user default server character set is used.

data_attribute
One of the following data attributes:
  • FORMAT
  • NAMED
  • TITLE