EasyManua.ls Logo

Sybase Adaptive Server Anywhere - Page 296

Sybase Adaptive Server Anywhere
1182 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Date and time data types
278
If the fraction portion of a time is less than 3 digits Adaptive Server
Enterprise interprets the value differently depending on whether it was
preceded by a period or a colon. If preceded by a colon, the value means
thousandths of a second. If preceded by a period, one digit means tenths, two
digits mean hundredths, and three digits mean thousandths. Adaptive Server
Anywhere interprets the value the same way, regardless of the separator.
Adaptive Server Enterprise converts the values below as shown. The second
line in each pair differs in the use of a colon rather than a period.
12:34:56.7 to 12:34:56.700
12:34:56:7 to 12:34:56.007
12.34.56.78 to 12:34:56.780
12.34.56:78 to 12:34:56.078
12:34:56.789 to 12:34:56.789
12:34:56:789 to 12:34:56.789
Adaptive Server Anywhere converts the milliseconds value in the manner
that Adaptive Server Enterprise does for values preceded by a period, in both
cases:
12:34:56.7 to 12:34:56.700
12:34:56:7 to 12:34:56.700
12.34.56.78 to 12:34:56.780
12.34.56:78 to 12:34:56.780
12:34:56.789 to 12:34:56.789
12:34:56:789 to 12:34:56.789
Retrieving dates and times from the database
Dates and times may be retrieved from the database in one of the following
ways:
Using any interface, as a string
Using ODBC, as a TIMESTAMP structure
Using embedded SQL, as a SQLDATETIME structure
When a date or time is retrieved as a string, it is retrieved in the format
specified by the database options DATE_FORMAT, TIME_FORMAT and
TIMESTAMP_FORMAT. For descriptions of these options, see "SET
OPTION statement" on page 612.
$ For information on functions that deal with dates and times, see "Date
and time functions" on page 304. The following arithmetic operators are
allowed on dates:
Examples

Table of Contents

Related product manuals