The dtaddinv() function
The dtaddinv() function adds an interval value to a datetime value. The result is a datetime value.
Syntax
mint dtaddinv(dt, inv, res)
dtime_t *dt;
intrvl_t *inv;
dtime_t *res;
- dt
- A pointer to an initialized datetime variable.
- inv
- A pointer to an initialized interval variable.
- res
- A pointer to a datetime variable to contain the result.
Usage
The dtaddinv() function adds the interval value in inv to the datetime value in dt and stores the datetime value in res. This result inherits the qualifier of dt.
The interval value must be in either the year to month or day to fraction(5) ranges.
The datetime value must include all the fields present in the interval value.
If you do not initialize the variables dt and inv, the function might return an unpredictable result.
Return values
- 0
- The addition was successful.
- <0
- Error in addition.