DATETIME and INTERVAL library functions
You must use the following library
functions for the datetime and interval data types to
perform all operations on those types of values. The following C functions
are available in to
handle datetime and interval host variables.
| Function name | Description | See |
|---|---|---|
| dtaddinv() | Adds an interval value to a datetime value | The dtaddinv() function |
| dtcurrent() | Gets the current date and time | The dtcurrent() function |
| dtcvasc() | Converts an ANSI-compliant character string to a datetime value | The dtcvasc() function |
| dtcvfmtasc() | Converts a character string with a specified format to a datetime value | The dtcvfmtasc() function |
| dtextend() | Changes the qualifier of a datetime value | The dtextend() function |
| dtsub() | Subtracts one datetime value from another | The dtsub() function |
| dtsubinv() | Subtracts an interval value from a datetime value | The dtsubinv() function |
| dttoasc() | Converts a datetime value to an ANSI-compliant character string | The dttoasc() function |
| dttofmtasc() | Converts a datetime value to a character string with a specified format | The dttofmtasc() function |
| incvasc() | Converts an ANSI-compliant character string to an interval value | The incvasc() function |
| incvfmtasc() | Converts a character string with a specified format to an interval value | The incvfmtasc() function |
| intoasc() | Converts an interval value to an ANSI-compliant character string | The intoasc() function |
| intofmtasc() | Converts an interval value to a character string with a specified format | The intoasc() function |
| invdivdbl() | Divides an interval value by a numeric value | The intofmtasc() function |
| invdivinv() | Divides an interval value by another interval value | The invdivdbl() function |
| invextend() | Extends an interval value to a different interval qualifier | The invdivinv() function |
| invmuldbl() | Multiplies an interval value by a numeric value | The invextend() function |
For more information about operations on the SQL DATETIME and INTERVAL data types, see the HCL® Informix® Guide to SQL: Reference.