Character String Format | Character-to-DATE Conversion | Teradata Vantage - Character String Format - 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™

If the dateform of the current session is INTEGERDATE, the date representation in the character string must match the DATE output format according to the rules in the following table.

IF the statement … THEN …
specifies a FORMAT phrase for the DATE the character string must match that DATE format.
does not specify a FORMAT phrase If the DATE column definition:

Specifies a FORMAT phrase, the character string must match the DATE format.

Does not specify a FORMAT phrase, the character string must match ‘YY/MM/DD’, or the current setting of the default date format in the specification for data formatting (SDF) file.

For an example, see Example: IntegerDate Dateform Mode.

If the dateform of the current session is ANSIDATE, the date representation in the character string must match the DATE output format according to the rules in the following table.

IF the statement … THEN …
specifies a FORMAT phrase for the DATE the character string must match that DATE format.
does not specify a FORMAT phrase If in field mode, then if the DATE column definition:
  • Specifies a FORMAT phrase, the character string must match that DATA format.
  • Does not specify a FORMAT phrase, the character string must match the ANSI format ('YYYY-MM-DD')

If in record or indicator mode, the character string must match the ANSI format ('YYYY-MM-DD').