Performs a shift from the specified date to a working date in the specified calendar, according to the variable's parameters. This function is valid for regular calendars only and is invalid for periodic calendars. It is not supported when used in a 'DOVARIABLE' statement. The format of the %%$WCALC function is:
%%$WCALC <date><instruction> calendar>
Where:
NOTE: When calculating the number of working days after the specified date, the date is not inclusive. For example, date format 20170115, searches for the nth working day in the forward direction, starting from from 16 January 2017.
NOTE: When calculating the number of working days before the specified date, the date is not inclusive. For example, date format 20170115, searches for the nth working day in the backwards direction, starting from 14 January 2017.
Return Value: If a working day is found, than the resolved value is the working day’s date, in format yyyymmdd. If a working day is not found, the resolved value is CTMERR
EXAMPLES:
Calculates the 10th working day from 20160131 160131 until 20181231 in the regcal calendar.
Calculates the 8th working day from 20160129 until 20140101 in the regal calendar.
Calculates the 1st working day from 20160131 until 20181231 in the regal calendar.
Calculates the 1st working day from 20160129 until 20140101
Parent Topic |