Example - 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

In this example, the current session time zone displacement, INTERVAL -'04:00' HOUR TO MINUTE, is used to determine the UTC value '12:30:00' for the TIME literal.

The result of the CAST is the time formed from the time portion of the source expression value '12:30:00' at UTC, and the specified time zone displacement, INTERVAL -'08:00' HOUR TO MINUTE.

The result value of the CAST '12:30:00' at UTC is adjusted to its time zone displacement, INTERVAL -'08:00' HOUR TO MINUTE, and the result of the SELECT statement is: TIME '04:30:00-08:00'.

The result of the SELECT statement is equal to TIME '12:30:00+00:00'.

SET TIME ZONE INTERVAL -'04:00' HOUR TO MINUTE;
SELECT CAST(TIME '08:30:00' AS TIME(0) WITH TIME ZONE AT -8);