DATE and DATETIME data types

Informix® provides two data types to store dates and time information:

Sybase ASE provides these data type to store dates:

String representing date time information

Informix is able to convert quoted strings to DATE / DATETIME data if the string contents matches environment parameters (i.e. DBDATE, GL_DATETIME). As in Informix, Sybase ASE can convert quoted strings representing datetime data in the ANSI format. The CONVERT() SQL function allows you to convert strings to dates.

Date time arithmetic

Solution

Sybase ASE has the same DATE data type as Informix ( year, month, day ). So you can use Sybase ASE DATE data type for Informix DATE columns.

Sybase ASE BIGTIME data type can be used to store Informix DATETIME HOUR TO SECOND and DATETIME HOUR TO FRACTION(5) values. The database interface makes the conversion automatically.

Informix DATETIME values with any precision from YEAR to FRACTION(5) can be stored in Sybase ASE BIGDATETIME columns. The database interface makes the conversion automatically. Missing date or time parts default to 1900-01-01 00:00:00.0. For example, when using a DATETIME HOUR TO MINUTE with the value of "11:45", the ASE TIMESTAMP value will be "1900-01-01 11:45:00.0".

See also Date and time in SQL statements for good SQL programming practices.