The ts_cal_stamp() function
The ts_cal_stamp() function returns the time stamp at a given number of calendar intervals before or after a given time stamp. The returned time stamp is located in allocated memory, so the caller should free it using mi_free().
Syntax
mi_datetime *
ts_cal_stamp (MI_CONNECTION *conn,
mi_string *cal_name,
mi_datetime *tstamp,
mi_integer offset)
- conn
- A valid DataBlade® API connection.
- cal_name
- The name of the calendar.
- tstamp
- The input time stamp.
- offset
- The number of calendar intervals before or after the input time stamp. Use a negative number to indicate an offset before the specified time stamp and a positive number to indicate an offset after the specified time stamp.
Description
The equivalent SQL function is CalStamp.
Returns
The time stamp representing the given offset, which must be freed by the caller.