Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 17 » SQL Anywhere Server - Database Administration » Database configuration » Database options » Alphabetical list of database options

sr_time_format option [SQL Remote]

Sets the format for TIME values that are retrieved from the database.

Allowed values




  PUBLIC role For current user For other users
Allowed to set permanently? Yes, with SET ANY USER DEFINED OPTION Yes Yes, with SET ANY USER DEFINED OPTION
Allowed to set temporarily? No No No

The Message Agent uses this option when replicating columns that store a time. The format is a string using the following symbols:

Symbol Description
HH Two-digit hours (24-hour clock).
NN Two-digit minutes.
MM Two-digit minutes if following a colon (as in HH:MM).
SS[.ssssss] Seconds and fractions of a second, up to six decimal places. Not all platforms support timestamps to a precision of six places.

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.


Using mixed case in the formatting string suppresses leading zeros.