Sets the format for times retrieved from the database.
{ ulcreate | ulinit | ulload } -o time_format=value;...
String (composed of the symbols listed below)
HH:NN:SS.sss
UltraLite writes times from time parts you set with the time_format creation parameter. Time parts can include hours, minutes, seconds, and milliseconds.
Time values can also be represented by strings. Before a time value can be retrieved, it must be assigned to a string variable.
ISO (HH:MM:SS) is the default time format. For example, "midnight" in this international format is written: 00:00:00. If you do not want to use the default ISO time format, you must specify a different format and order for these time parts.
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[.s...] | Two digit seconds plus optional fraction. |
You cannot change the time format of an existing database. Instead, you must create a new database.
Each symbol is substituted with the appropriate data for the time that is being formatted. Any format symbol that represents character rather than digit output can be put in uppercase, which causes the substituted characters to be in uppercase. For numbers, using mixed case in the format string suppresses leading zeros.
You can control zero-padding with the case of the symbols:
Type the symbol in same-case (such as HH or hh) to allow zero padding. For example, HH:NN:SS could produce 01:01:01.
Type the symbol in mixed case (such as Hh or hH) to suppress zero padding. For example, Hh:Nn:Ss could produce 1:1:1.
From Sybase Central, you can set the time format in any wizard that creates a database. On the New database creation parameters page, select the Time Format option.
From a client application, set this parameter as one of the creation parameters for the create database method on the database manager class.
If a transaction was executed at 3:30 P.M. and you used the default time_format syntax of HH:NN:SS.sss, the result would be:
15:30:55.0
Discuss this page in DocCommentXchange. Send feedback about this page using email. |
Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1 |