Accepts a time of day. Spaces are stripped from the input before parsing (except for the space between time digits and an AM/PM suffix, which is handled separately).
Basic
| Format | Example |
|---|---|
hh:mm |
09:30 |
hh:mm:ss |
09:30:00 |
hh:mm:ss.f to hh:mm:ss.ffffff |
09:30:00.5 → 500 ms |
The : separator is always accepted. The runtime
TimeSeparator is also accepted unless it is .,
in which case it would conflict with the fractional seconds separator;
only : is then valid.
Fractional seconds
1 to 6 digits are accepted after the . separator. The
value is normalized to milliseconds (0–999): fewer than 3 digits are
right-padded with zeros (.5 → 500 ms); more than 3 digits
are truncated (.1234 → 123 ms). A trailing dot with no
digits, or more than 6 fractional digits, returns
ERR_INVALID_FORMAT. Zero milliseconds (.000)
produce a plain hh:mm:ss literal with no fractional
part.
AM/PM combined with fractional seconds is not supported and returns
ERR_INVALID_FORMAT.
AM/PM
Accepted on locales where the runtime TimeAMString and
TimePMString are non-empty (12-hour locales). Both attached
(9:30AM) and space-separated (9:30 AM) forms
are recognized. The SQL literal is always 24-hour.
Input: 2:30 PM → Values[0]: 14:30:00
SQLValues[0] (ElevateDB): TIME '14:30:00'
The 24-hour display string in hh:mm:ss format, with
.fff appended when milliseconds are non-zero.
09:30 → 09:30:00
09:30:15.5 → 09:30:15.500
The SQL time literal depends on the dialect. See SQL dialects for the full format table.
09:30:15.500 →
sqlElevateDB,
sqlMySQL,
sqlPostgreSQL: TIME '09:30:15.500'
sqlFirebird: TIME '09:30:15.5000' (ms × 10)
sqlDBISAM,
sqlMSSQLServer,
sqlSQLite: '09:30:15.500'
sqlOracle: TO_TIMESTAMP('09:30:15.500','HH24:MI:SS.FF3')
sqlAccess: #09:30:15# (ms dropped)
sqlBDEParadox: "09:30:15" (ms dropped)
Input: 08:00~17:00
→ otRange
→ BETWEEN TIME '08:00:00' AND TIME '17:00:00' (sqlElevateDB)
The left time must not be later than the right time; otherwise
ERR_INVALID_RANGE is returned. Order is determined by
lexicographic comparison of the hh:mm:ss[.fff] strings,
which is equivalent to chronological order because all fields are
zero-padded to fixed width.