The ts_cal_index() function
The ts_cal_index() function returns the number of valid intervals in a calendar between two given time stamps.
Syntax
mi_integer *
ts_cal_index (MI_CONNECTION *conn,
mi_string *cal_name,
mi_datetime *begin_stamp,
mi_datetime *end_stamp)
- conn
- A valid connection.
- cal_name
- The name of the calendar.
- begin_stamp
- The beginning time stamp. begin_stamp must not be earlier than the calendar origin.
- end_stamp
- The time stamp whose offset from begin_stamp is to be determined. This time stamp can be earlier than begin_stamp.
Description
The equivalent SQL function is CalIndex.
Returns
The number of valid intervals in the given calendar between the two time stamps. If end_stamp is earlier than begin_stamp, then the result is a negative number.