ifx_dtcvasc()

Converts a character string to a datetime value; allows you to specify the century setting for 2-digit years.

Syntax

mint ifx_dtcvasc(char *str, dtime_t *d, char c);
  1. str is a pointer to a buffer that contains an ANSI-standard datetime string.
  2. d is a pointer to a datetime variable, initialized with the desired qualifier.
  3. c is a character which 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.
-1260 It is not possible to convert between the specified types.
-1261 Too many digits in the first field of datetime or interval.
-1262 Non-numeric character in datetime or interval.
-1263 A field in a datetime or interval value is out of range or incorrect.
-1264 Extra characters exist at the end of a datetime or interval.
-1265 Overflow occurred on a datetime or interval operation.
-1266 A datetime or interval value is incompatible with the operation.
-1267 The result of a datetime computation is out of range.
-1268 A parameter contains an invalid datetime qualifier.

Usage

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.