Examples | FORMAT Phrase and DateTime Formats | Teradata Vantage - 17.10 - Examples: Date Formats - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - Data Types and Literals

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1143-171K
Language
English (United States)

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