Format Consistency - 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 a field is declared as type DATE and a FORMAT phrase is specified for it, the date must be entered in the specified format and it must be enclosed in apostrophes.

For example, data supplied to, or used in, a conditional WHERE or HAVING clause for the following column must be defined as 'OCT 24, 1985'.

DOB DATE FORMAT 'MMMbDD,bYYYY'

This format consistency restriction applies only to the date values themselves, and not to the date separators. The input date separators need not match the FORMAT phrase date separators. In addition, you can enter a 4-digit year even if the FORMAT phrase specifies the year as 'YY'.