DateTime Literals - Advanced SQL Engine - Teradata Database

SQL Data Types and Literals

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-27
dita:mapPath
tpf1598412463935.ditamap
dita:ditavalPath
tpf1598412463935.ditaval
dita:id
B035-1143
lifecycle
previous
Product Category
Teradata Vantageā„¢

The ANSI SQL DateTime literals provide DateTime values in source text, supporting a means for declaring values for DATE, TIME, and TIMESTAMP data types.

Keywords for ANSI DateTime Literals

ANSI SQL DateTime literals differ from other SQL literals in that they are always prefaced by a keyword or keywords.

Here is an example showing the TIMESTAMP keyword prefacing a timestamp literal:

TIMESTAMP '1999-07-01 15:00:00-08:00'

Literals expressed in this format are interpreted exclusively as ANSI DateTime values.