TIMESTAMP-to-DATE Conversion Usage Notes - Teradata VantageCloud Lake

Lake - Working with SQL

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Published
February 2025
ft:locale
en-US
ft:lastEdition
2025-11-21
dita:mapPath
jbe1714339405530.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
jbe1714339405530

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

Option timestamp_expression Data type Result
AT LOCAL With or without TIME ZONE Result is date portion of source timestamp_expression after adjusting UTC value by adding time zone displacement based on current session time zone.

This is the same as not specifying AT clause.

AT SOURCE

(where SOURCE is keyword and not column reference)

WITH TIME ZONE Result is date portion of source timestamp_expression after adjusting UTC value by adding time zone displacement associated with timestamp_expression.
Without TIME ZONE Error is returned.
AT SOURCE TIME ZONE WITH TIME ZONE Result is date portion of source timestamp_expression after adjusting UTC value by adding time zone displacement associated with timestamp_expression.
Without TIME ZONE Error is returned.
AT [ TIME ZONE ] expression With or without TIME ZONE Result is date portion of source timestamp_expression after adjusting UTC value by adding time zone displacement defined by expression.
AT [ TIME ZONE ] time_zone_string With or without TIME ZONE Result is date portion of source timestamp_expression after adjusting UTC value by adding time zone displacement based on time_zone_string. Time zone displacement is based on time_zone_string and TIMESTAMP value of timestamp_expression.