Examples: Date Formats

Teradata Vantageā„¢ Data Types and Literals

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

The following table is a nonexhaustive list of formats that can be used to present an output date, where the data is 85/09/12:

FORMAT Phrase Result
FORMAT 'YY/MM/DD' 85/09/12
FORMAT 'DD-MM-YY' 12-09-85
FORMAT 'YYYY/MM/DD' 1985/09/12
FORMAT 'YYYY-MM-DD' 1985-09-12
FORMAT 'YYYY.DDD' 1985.225
FORMAT 'YYBDDD' 85 225
FORMAT 'DDBMMMBYYYY' 12 Sep 1985
FORMAT 'MMMBDD,BYYYY' Sep 12, 1985
FORMAT 'YYYYBMMMBDD' 1985 Sep 12
FORMAT 'MMM' Sep
FORMAT 'EEE,BM4BDD,BYYYY' Thu, September 12, 1985
FORMAT 'E4,BMMMMBDD,BYYYY' Thursday, September 12, 1985
FORMAT 'E4BDDBM4BYYYY' Jeudi 12 Septembre 1985

(Jeudi is French for Thursday and Septembre is French for September.)

FORMAT '999999' 850912