16.20 - Hierarchy of Date Formats - Teradata Vantage NewSQL Engine

Teradata Vantage™ Data Types and Literals

prodname
Teradata Database
Teradata Vantage NewSQL Engine
vrm_release
16.20
category
Programming Reference
featnum
B035-1143-162K

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