17.10 - Usage Notes - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - Data Types and Literals

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1143-171K
Language
English (United States)

The following table shows the result of the CAST function or Teradata conversion based on the various options specified. If the target precision is higher than zero, trailing zeros are added in the result to adjust the precision.

IF you specify... THEN...
AT LOCAL a local timestamp value is formed from the source date_expression with the time portion set to '00:00:00'. Then, the result is formed from this local timestamp value adjusted to UTC by subtracting the time zone displacement based on the current session time zone.

This is the same as not specifying the AT clause.

AT expression

or

AT TIME ZONE expression

a local timestamp value is formed from the source date_expression with the time portion set to '00:00:00'. Then, the result is formed from this local timestamp value adjusted to UTC by subtracting the time zone displacement defined by expression.
AT time_zone_string

or

AT TIME ZONE time_zone_string

a local timestamp value is formed from the source date_expression with the time portion set to '00:00:00'. The time zone displacement is determined based on time_zone_string and the local timestamp value. Then, the result is formed from the local timestamp value adjusted to UTC by subtracting the time zone displacement.