Date and time of day are stored in SQL Anywhere databases using one of the following data types:
Data type | Contains | Stored in | Range of possible values |
---|---|---|---|
DATE | Calendar date (year, month, day) | 4 bytes | Dates from 0001-01-01 to 9999-12-31. |
TIME | Time of day (hour, minute, second, and fraction of a second accurate to 6 decimal places) | 8 bytes | Times from 00:00:00.000000 to 24:00:00.000000. |
TIMESTAMP | Calendar date and time of day (year, month, day, hour, minute, second, and fraction of a second accurate to 6 decimal places) | 8 bytes | Dates from 0001-01-01 to 9999-12-31 (precision of the hours and minutes portion of a TIMESTAMP is dropped before 1600-02-28 23:59:59 and after 7911-01-01 00:00:00). |
TIMESTAMP WITH TIME ZONE | Calendar date, time of day, and time zone offset (year, month, day, hour, minute, second, fraction of a second accurate to 6 decimal places, and time zone offset in hours and minutes) | 10 bytes | Dates from 0001-01-01 to 9999-12-31 (precision of the hours and minutes portion of a TIMESTAMP WITH TIME ZONE is dropped before 1600-02-28 23:59:59 and after 7911-01-01 00:00:00). Zone offset from -14:59 to +14:59. |
Discuss this page in DocCommentXchange.
|
Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1 |