Example: Querying with CAST - Teradata Vantage NewSQL Engine - 16.20

Teradata Vantage™ Data Types and Literals

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

The following query returns ‘2007-12-31 23:59:59.999999-08:00’.

SELECT CAST('2007-12-31 23:59:59.999999' 
AS TIMESTAMP(6) WITH TIME ZONE);

Notice that the source character string did not need to have explicit Time Zone fields for this conversion to work properly.