Hierarchy of Date Formats - Advanced SQL Engine - Teradata Database

SQL Data Types and Literals

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-22
dita:mapPath
zsn1556242031050.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1143
lifecycle
previous
Product Category
Teradata Vantage™

The operations that set the DATE format are best described as a hierarchy, where one setting overrides another.

At the lowest level, the system comes with a DateForm of IntegerDate (' YY/MM/DD '). Your system administrator can override that date format by changing the DateForm to ANSIDate (' YYYY-MM-DD ') or creating a custom SDF that changes the default DATE format (any valid date format).

You can override the system-level date format for a user, session, individual column, or individual value.

The following table summarizes the hierarchy of date formats.

For this operation … The format is set for … And using this session date setting … And field mode

display format …

The export data type is …
SELECT with FORMAT phrase an individual column user-defined display format as defined by FORMAT CHAR(10) if DateForm is ANSIDate; ELSE four-byte integer
CREATE / ALTER TABLE, with FORMAT phrase
SET SESSION DateForm the session ANSIDate YYYY-MM-DD CHAR(10)
CLI SessionOptions parcel DateForm IntegerDate YY/MM/DD, or the value of the DATE element in a custom SDF four-byte integer
CREATE / MODIFY USER DateForm the user ANSIDate YYYY-MM-DD CHAR(10)
IntegerDate YY/MM/DD, or the value of the DATE element in a custom SDF four-byte integer
System DBS Control utility

DateForm

the system ANSIDate YYYY-MM-DD CHAR(10)
IntegerDate YY/MM/DD, or the value of the DATE element in a custom SDF four-byte integer
Default DATE format in custom SDF the system IntegerDate as defined by the DATE format in the SDF four-byte integer