NotOp function

The NotOp function turns all on intervals off and all off intervals on in the specified calendar pattern.

Syntax

NotOp (cal_patt CalendarPattern) 
returns CalendarPattern;
cal_patt
The calendar pattern to convert.

Returns

The inverted calendar pattern.

Example

The following statement converts the workweek_day calendar:
select * from CalendarPatterns
                where cp_name = 'workweek_day';

cp_name               workweek_day
cp_pattern         {1 off,5 on,1 off},day

select NotOp(cp_pattern)
from CalendarPatterns
         where cp_name = 'workweek_day';

(expression) {1 on,5 off,1 on}, day