TIME_FORMAT Option

Sets the format used for times retrieved from the database.

Allowed values

A string composed of the symbols HH, NN, MM, SS, separated by colons.

Default

'HH:NN:SS.SSS'

For Open Client and JDBC connections the default is also set to HH:NN:SS.SSS.

Description

The format is a string using these symbols:

  • hh – Two-digit hours (24 hour clock).

  • nn – Two-digit minutes.

  • mm – Two-digit minutes if following a colon (as in 'hh:mm').

  • ss[.s...s] – Two-digit seconds plus optional fraction.

Each symbol is substituted with the appropriate data for the date being formatted. Any format symbol that represents character rather than digit output can be in uppercase, which causes the substituted characters also to be in uppercase. For numbers, using mixed case in the format string suppresses leading zeros.

Multibyte characters are not supported in format strings. Only single-byte characters are allowed, even when the collation order of the database is a multibyte collation order like 932JPN.

Related reference
DATE_FORMAT Option
RETURN_DATE_TIME_AS_STRING Option