Sets the format for times retrieved from the database.
String
HH:NN:SS.SSS
A temporary setting for the current user is established by the ODBC and JDBC drivers ('hh:nn:ss'), and the OLE DB driver ('hh:nn:ss.ssssss').
A temporary setting for the current user is established by SAP Open Client and jConnect TDS connections ('HH:NN:SS.SSS').
PUBLIC role | For current user | For other users | |
---|---|---|---|
Allowed to set permanently? | Yes, with SET ANY PUBLIC OPTION | Yes | Yes, with SET ANY PUBLIC OPTION |
Allowed to set temporarily? | Yes, with SET ANY PUBLIC OPTION | Yes (current connection only) | No |
The format is a string using the following symbols:
Symbol | Description |
---|---|
HH | Two-digit hours. |
NN | Two-digit minutes. |
SS[.ssssss] | Seconds and fractions of a second, up to six decimal places. Not all platforms support timestamps to a precision of six places. |
AA | AM or PM (12 hour clock). Omit AA and PP for 24 hour time. |
PP | PM if needed (12 hour clock). Omit AA and PP for 24 hour time. |
Each symbol is substituted with the appropriate data for the time that is being formatted.
For symbols that represent numeric data, you can control zero-padding with the case of the symbols:
Type the symbol in same-case (such as NN or nn) to allow zero padding. For example, hh:nn:ss.sss could produce 02:34:56.123.
Type the symbol in mixed case (such as Nn) to suppress zero padding. For example, Hh:nn:ss.sss could produce 2:34:56.123.
If the first two digits of the fractional seconds are mixed case (such as Ss or sSssss) then trailing zeros are removed. For example, hh:nn:ss.Sss could produce 12:34:56.1.