CalIndex 函数返回日历中两个给定时间戳记之间的有效时间间隔数。
CalIndex(cal_name lvarchar, begin_stamp datetime year to fraction(5), end_stamp datetime year to fraction(5)) returns integer;
等效的 API 函数为 ts_cal_index()。
给定日历中两个时间戳记之间的有效时间间隔数。
select CalIndex('daycal', '2011-01-03 00:00:00.00000', '2011-01-05 00:00:00.00000') from systables where tabid = 1;