# DATE

DATE provides for storage of a year-month-day in the range supported by java.sql.Date.

#### Syntax

    DATE

#### Corresponding compile-time Java type

java.sql.Date

#### JDBC metadata type (java.sql.Types)

DATE

Dates, times, and timestamps must not be mixed with one another in expressions.

Any value that is recognized by the java.sql.Date method is permitted in a column of the corresponding SQL date/time data type. Derby supports the following formats for DATE:

    yyyy-mm-dd
    mm/dd/yyyy
    dd.mm.yyyy

The first of the three formats above is the java.sql.Date format.

The year must always be expressed with four digits, while months and days may have either one or two digits.

Derby also accepts strings in the locale specific datetime format, using the locale of the database server. If there is an ambiguity, the built-in formats above take precedence.

#### Examples

    VALUES DATE('1994-02-23')

    VALUES '1993-09-01'

Parent topic: Data types
Related concepts
Built-In type overview
Numeric types
Related reference
Data type assignments and comparison, sorting, and ordering
BIGINT
BLOB
CHAR
CHAR FOR BIT DATA
CLOB
DECIMAL
DOUBLE
DOUBLE PRECISION
FLOAT
INTEGER
LONG VARCHAR
LONG VARCHAR FOR BIT DATA
NUMERIC
REAL
SMALLINT
TIME
TIMESTAMP
VARCHAR
VARCHAR FOR BIT DATA
XML data type