Converts a character string to the native database date
format.
Syntax
mint ifx_strdate(char *str, int4 *jdate, char c);
- str is a pointer to the string that contains the date to
convert.
- jdate is a pointer to a int4 integer that receives the
internal DATE value for the str string.
- c is a character tgat determines which century to apply
to the year portion of the date.
Returns
Table 1. Return codes
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. |
-1218 |
The date specified by the str argument
does not properly represent a date. |
Usage
The DBDATE environment variable
specifies the data conversion format.
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.