16.10 - Examples: Date Formats - Teradata Database

Teradata Database SQL Data Types and Literals

prodname
Teradata Database
vrm_release
16.10
created_date
June 2017
category
Programming Reference
featnum
B035-1143-161K

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