Examples | FORMAT Phrase and DateTime Formats | Teradata Vantage - Examples: Querying Using Date Formats - Teradata Vantage - Analytics Database

SQL Data Types and Literals

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2025-11-06
dita:mapPath
uds1628112204571.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
exs1472253032394
lifecycle
latest
Product Category
Teradata Vantage™

Use a statement like the following to display a date in uppercase:

SELECT DATE (FORMAT 'MMMbdd,bYYYY') (CHAR(12), UC);

Using 1985-09-12 for data, this statement returns:

SEP 12, 1985

The following query shows how to specify a date if, for example, the p_date column was specified as FORMAT ' DDBMMMBYYYY ':

SELECT *
FROM sales
WHERE p_date = '30 Mar 1994';

If the p_date column was specified as FORMAT ' YYYY-MM-DD ', the query would be as follows:

SELECT *
FROM sales
WHERE p_date = '1994-03-30';