Using the FORMAT Phrase to Set TIME or TIMESTAMP 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ā„¢

You can use the FORMAT phrase to set the format for a specific TIME or TIMESTAMP column or value. A FORMAT phrase overrides the TIME or TIMESTAMP system format.

Setting a different TIME or TIMESTAMP format for a column with the FORMAT phrase has the same consequences as with any other method:
  • Data entry for that column must be in the new format or the ANSI TIME or TIMESTAMP literal format.
  • To compare or convert strings to TIME or TIMESTAMP values in the column, strings must match that format.

A FORMAT phrase does not change the export data type of TIME or TIMESTAMP values.

For details about using the FORMAT phrase, see FORMAT Phrase and DateTime Formats or FORMAT Phrase, DateTime Formats, and Japanese Character Sets.