Declares a date value in ANSI DATE format in an expression.
ANSI DATE literal is the preferred format for date constants. All date operations accept this format.
Syntax element …
a 10-character string enclosed in apostrophes in the following form:
Date literals consist of the word DATE followed by a character string literal. This character string specifies the date value.
The year, month, and day components of the string literal must be separated by hyphens.
Spaces and new line characters are not allowed in a literal except after the keyword DATE.
The following example selects all classes from the Classes table that start on January 6, 1998.
WHERE startdate = DATE '1998-01-06';
For information on DATE data types, see “DATE Data Type” on page 130.