TIME

The TIME data type 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

Usage Notes

Here are several usage notes for the TIME data type:

  • 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. Splice Machine 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.
  • Splice Machine also accepts strings in the locale specific date-time format, using the locale of the database server. If there is an ambiguity, the built-in formats above take precedence.

Please see Working With Date and Time Values for information about using simple arithmetic with TIME values.

Examples

VALUES TIME('15:09:02');
VALUES '15:09:02';

See Also