SQL adaptation guide For IBM Netezza 1.x / Data dictionary |
Informix® provides two data types to store dates and time information:
Netezza® provides the following data type to store date and 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, Netezza can convert quoted strings to date time data. Netezza accepts different date formats, including ISO date time strings, and you can specify the cast operator (::date, ::time, ::timestamp) after the string literal.
Informix supports implicit DATE/DATETIME conversions, for example you can use a DATE variable when the target column is a DATETIME. This is not possible with Netezza: The type of the SQL parameter must match the type of the column in the database table.
Netezza has the same DATE data type as Informix ( year, month, day ). So you can use Netezza DATE data type for Informix DATE columns.
Netezza TIME data type can be used to store Informix DATETIME HOUR TO SECOND values. The database interface makes the conversion automatically.
Informix DATETIME values with any precision from YEAR to FRACTION(5) can be stored in Netezza TIMESTAMP 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 Netezza TIMESTAMP value will be "1900-01-01 11:45:00.0".