# TIME

TIME provides for storage of a time-of-day value.

#### Syntax

    TIME

#### Corresponding compile-time Java type

java.sql.Time

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

TIME

Dates, times, and timestamps cannot be mixed with one another in expressions except with a CAST.

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

    hh:mm[:ss]
    hh.mm[.ss]
    hh[:mm] {AM | PM}

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

Hours may have one or two digits. Minutes and seconds, if present, must have 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 TIME('15:09:02')
    VALUES '15:09:02'

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
DATE
DECIMAL
DOUBLE
DOUBLE PRECISION
FLOAT
INTEGER
LONG VARCHAR
LONG VARCHAR FOR BIT DATA
NUMERIC
REAL
SMALLINT
TIMESTAMP
VARCHAR
VARCHAR FOR BIT DATA
XML data type