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

SQL Anywhere 10.0.1 » UltraLite - Database Management and Reference » UltraLite Database Settings Reference » Configurable properties in UltraLite

UltraLite time_format property Next Page

UltraLite timestamp_format property

Sets the format for timestamps that are retrieved from the database.

How to set it

UltraLite employs different methods for setting this property:

ContextImplemented by

From the command line    Use any utility that creates a database.

Use the following property syntax:

-o timestamp_format=value

From Sybase Central    Use any wizard that creates a database.

On the New Database Options page, set the Timestamp Format option .

From a client application    Use the create database method.

Set this property as one of the creation parameters for an API's create database method on the database manager class.

Allowed values

A string using any of the following symbols:




Two digit year.


Four digit year.


Two digit month, or two digit minutes if following a colon (as in hh:mm).


Character short form for months—as many characters as there are "m"s. An uppercase M causes the output to be made uppercase.


Single digit day of week, (0 = Sunday, 6 = Saturday).


Two digit day of month. A leading zero is not required.


Character short form for day of the week. An uppercase D causes the output to be made uppercase.


Two digit hours. A leading zero is not required.


Two digit minutes. A leading zero is not required.


Seconds and parts of a second.


Use 12 hour clock. Indicate times before noon with AM.


Use 12 hour clock. Indicate times after noon with PM.


Day of the year, from 1 to 366.




You cannot change the timestamp format of an existing database. Instead, you must create a new database.

Allowed values are constructed from the symbols listed in the table above. Each symbol is substituted with the appropriate data for the date that is being formatted.

For the character short forms, the number of letters specified is counted, and then the A.M. or P.M. indicator (which could be localized) is truncated, if necessary, to the number of bytes corresponding to the number of characters specified.

Controlling output case    For symbols that represent character data (such as mmm), you can control the case of the output as follows:

Controlling zero-padding    For symbols that represent numeric data, you can control zero-padding with the case of the symbols:

See also

If a transaction was executed on Friday May 12, 2006 at 3:30 PM and you used the default timestamp_format syntax of YYYY-MM-DD HH:NN:SS.SSS, the result would be:

2006-05-12 15:30:55.0