Operations on date and time data

You can use Informix® ESQL/C and DataBlade® API functions to perform operations on date and time data.

The Informix ESQL/C library provides functions to perform operations on DATETIME (mi_datetime) and INTERVAL (mi_interval) values.

Table 1. Informix ESQL/C function that perform operations on date and time data
Function name Description
dtaddinv() Adds an mi_interval value to a mi_datetime value
dtcurrent() Gets current date and time
dtsub() Subtracts one mi_datetime value from another
dtsubinv() Subtracts an mi_interval value from a mi_datetime value
invdivdbl() Divides an mi_interval value by a numeric value
invdivinv() Divides an mi_interval value by an mi_interval value
invmuldbl() Multiplies an mi_interval value by a numeric value

Any other operations, modifications, or analyses can produce unpredictable results.