To add an interval value to a datetime value
mint dtaddinv(dtime_t *d, intrvl_t *i, dtime_t *r);
0 The addition was successful.
<0 Error in addition.
Returns the current date and time
void dtcurrent(dtime_t *d);
To convert an ASCII-standard character string to a datetime value
mint dtcvasc(char *str, dtime_t *d);
0 Conversion was
successful.
-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.
To convert a character string to a datetime value; allows you to specify the century setting for 2-digit years
mint ifx_dtcvasc(char *str, dtime_t *d, char db_century);
Character | Description |
R | Present. The function uses the two high-order digits of the current year to expand the year value. |
P
|
Past. The function uses the present and past centuries to expand the year value. It compares these two dates against the current date and uses the century that is prior to the current century. If both dates are prior to the current date, the function uses the century closest to the current date. |
F
|
Future. The function uses the present and next centuries to expand the year value. It compares these against the current date and uses the century that is later than the current date. If both dates are later than the current date, the function uses the date closest to the current date. |
C |
Closest. The function uses the present, past, and next centuries to expand the year value. It chooses the century that is closest to the current date. |
0 Conversion was successful.
-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.
To convert a character string to a datetime value, specifying the format of the string
mint dtcvfmtasc(char *input, char *fmt, dtime_t *d);
%Y-%m-%d %H:%M:%S
0 The conversion was successful.
<0 The conversion failed.
To copy a datetime value id to the datetime value od, adding or dropping fields based on the qualifier of od
mint dtextend(dtime_t *id, dtime_t *od);
0 The operation was
successful.
-1268 A parameter contains an invalid datetime qualifier.
To subtract one datetime value from another
mint dtsub(dtime_t *d1, dtime_t *d2, intrvl_t *i);
0 The subtraction was successful.
<0 An error occurred while performing the subtraction.
To subtract an interval value from a datetime value
mint dtsubinv(dtime_t *d, intrvl_t *i, dtime_t *r);
0 The subtraction was successful.
<0 An error occurred while performing the subtraction.
To convert a datetime value to an ANSI-standard character string
mint dttoasc(dtime_t *d, char *str);
Field Field Size year four digits fraction of datetime as specified by precision all other fields two digits For example, datetime year to fraction(5):
YYYY-MM-DD HH:MM:SS.FFFFF
0 The conversion was successful.
<0 The conversion failed.
To convert a datetime value to a character string, specifying the format
mint dttofmtasc(dtime_t *d, char *output, mint str_len, char *fmtstr);
%Y-%m-%d %H:%M:%S
0 The conversion was successful.
<0 The conversion failed. Check the text of the error message.
To convert an ANSI-standard character string to an interval value
mint incvasc(char *str, intrvl_t *i);
0 The conversion was
successful.
-1260 It is not possible to convert between the specified types.
-1261 Too many digits in the first field of datetime or interval.
To convert a character string having the specified format to an interval value
mint incvfmtasc(char *input, char *fmt, intrvl_t *intvl);
0 The conversion was successful.
<0 The conversion failed.
To convert an interval value to an ANSI-standard character string
mint intoasc(intrvl_t *i, char *str);
0 The conversion was successful.
<0 The conversion failed.
To convert an interval value to a character string, specifying the format
mint intofmtasc(intrvl_t *i, char *output, mint str_len, char *fmtstr);
0 The conversion was successful.
<0 The conversion failed.
To divide an interval value by a numeric value
mint invdivdbl(intrvl_t *iv, double dbl, intrvl_t *ov);
0 The division was
successful.
<0 The division failed.
-1200 A numeric value is too large (in magnitude).
-1201 A numeric value is too small (in magnitude).
-1202 The dbl parameter is zero (0).
To divide one interval value by another
mint invdivinv(intrvl_t *i1, intrvl_t *i2, double *res);
0 The division was successful.
<0 The division failed.
-1200 A numeric value is too large (in magnitude).
-1201 A numeric value is too small (in magnitude).
-1266 An interval value is incompatible with the operation.
-1268 A parameter contains an invalid interval qualifier.
To copy an interval value i to the interval value o, adding or dropping fields based on the qualifier of o
mint invextend(intrvl_t *i, intrvl_t *o);
0 The conversion was
successful.
<0 The conversion failed.
-1266 An interval value is incompatible with the operation.
-1268 A parameter contains an invalid interval qualifier.
To multiply an interval value by a numeric value
mint invmuldbl(intrvl_t *iv, double dbl, intrvl_t *ov);
0 The multiplication was
successful.
<0 The multiplication failed.
-1200 A numeric value is too large (in magnitude).
-1201 A numeric value is too small (in magnitude).
-1266 An interval value is incompatible with the operation.
-1268 A parameter contains an invalid interval qualifier.