Usage Notes - Teradata Vantage - Analytics Database

SQL Data Types and Literals

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2025-11-06
dita:mapPath
uds1628112204571.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
exs1472253032394
lifecycle
latest
Product Category
Teradata Vantageā„¢

The following table shows the result of the CAST function or Teradata conversion based on the various options specified. Note that the time zone adjustment may change the YEAR, MONTH, and DAY fields of the DATE value.

IF you specify... AND the data type of timestamp_expression is... THEN...
AT LOCAL with or without TIME ZONE the result is the date portion of the source timestamp_expression after adjusting its UTC value by adding the time zone displacement based on the current session time zone.

This is the same as not specifying the AT clause.

AT SOURCE

(where SOURCE is a keyword and not a column reference)

WITH TIME ZONE the result is the date portion of the source timestamp_expression after adjusting its UTC value by adding the time zone displacement associated with timestamp_expression.
AT SOURCE

(where SOURCE is a keyword and not a column reference)

without TIME ZONE an error is returned.
AT SOURCE TIME ZONE WITH TIME ZONE the result is the date portion of the source timestamp_expression after adjusting its UTC value by adding the time zone displacement associated with timestamp_expression.
AT SOURCE TIME ZONE without TIME ZONE an error is returned.
AT expression

or

AT TIME ZONE expression

with or without TIME ZONE the result is the date portion of the source timestamp_expression after adjusting its UTC value by adding the time zone displacement defined by expression.
AT time_zone_string

or

AT TIME ZONE time_zone_string

with or without TIME ZONE the result is the date portion of the source timestamp_expression after adjusting its UTC value by adding the time zone displacement based on time_zone_string. The time zone displacement is determined based on time_zone_string and the TIMESTAMP value of timestamp_expression