Syntax

 

<datetime literal> ::=

 

<date literal> ::= DATE <date string>

 

<time literal> ::= TIME <time string>

 

<timestamp literal> ::= TIMESTAMP <timestamp string>

 

<date string> ::= <quote> year-month-day <quote>

 

<time string> ::= <quote> hour:minute:second [ . [ millisecond ] ] <quote>

 

<timestamp string> ::= <quote> year-month-day hour:minute:second [ . [ millisecond ] ] <quote>

 

 

Examples

 

Data Type

 

Literal Examples

 

DATE

DATE '2004-09-25'

TIME

TIME '14:28:36'

TIMESTAMP

TIMESTAMP '2004-09-25 14:28:36'

 

 


 

Conformance

 

SQL:2003 standard

-

Core SQL