| C-Extensions / C API functions | |
Converts a string in a specified format to the native database date format.
mint ifx_defmtdate(int4 *pdate, char *fmt, char *input, char c);
| Code | Description |
|---|---|
| 0 | The conversion was successful. |
| <0 | The conversion failed. |
| -1204 | The str parameter specifies an invalid year. |
| -1205 | The str parameter specifies an invalid month. |
| -1206 | The str parameter specifies an invalid day. |
| -1212 | Data conversion format must contain a month, day, or year component. DBDATE specifies the data conversion format. |
| -1209 | Because *input does not contain delimiters between the year, month, and day, the length of *input must be exactly six or eight bytes. |
The fmt string contains the formatting mask for the string.
The function allows you to specify the century setting for two-digit dates. The c parameter must be one of century characters, which determines which century to apply to the year portion of the date.