Date, time, datetime, and timestamp data types

Although all three products support some form of date and time data, there are some differences.

Display formats for dates have different defaults:

Time conversions are as follows:

When you insert a time into a DATETIME column:

TIME and DATETIME values retrieved from an Adaptive Server Enterprise database change when inserted into a Sybase IQ table with a DATETIME column using INSERT…LOCATION. The INSERT…LOCATION statement uses Open Client, which has a DATETIME precision of 1/300 of a second.

For example, assume that the following value is stored in a table column in an Adaptive Server Enterprise database:

2004-11-08 10:37:22.823

When you retrieve and store it in a Sybase IQ table using INSERT...LOCATION, the value becomes:

2004-11-08 10:37:22.823333

Compatibility of datetime and time values from ASE

A DATETIME or TIME value retrieved from an Adaptive Server Enterprise database using INSERT...LOCATION can have a different value due to the datetime precision of Open Client.

For example, the DATETIME value in the Adaptive Server Enterprise database is ‘2004-11-08 10:37:22.823’ as retrieved using INSERT...LOCATION is ‘2004-11-08 10:37:22.823333’.