Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
is it possible to exclude list of holidays from NetWordDays function in Script?
Note: list contains company holidays of 2 years. so cant process this in Chart expression..
Please suggest.
Thanks & Reagrds
Jyothi
Below code worked fine!
tblHoliday:
LOAD Day as Holiday
FROM
(.....Filename.)
/************** varHoliday **************/
tmpTbl:
NoConcatenate
LOAD Chr(39) & Concat(Holiday,Chr(39)&','&Chr(39))&Chr(39) as fieldHoliday
Resident tblHoliday;
LET varHoliday = Peek('fieldHoliday',0,'tmpTbl');
and then using below function inside table load:
NetWorkDays([Start Date],[End Date],$(varHoliday)) as WorkingDays
Yes, you can use newtworkdays() in the script.
Yes, you can use any number of holidays in chart expression as well.
And, see this: Calculating Holidays in script
Hi Mike,
Thanks for sharing the informative post.
I already have an external file with list of holidays which is updated every year.
could you please suggest how do i modify the script to accommodate this?
Thanks & Reagrds
Jyothi
No, I can't, because I don't know your application... or at least your script.
Below code worked fine!
tblHoliday:
LOAD Day as Holiday
FROM
(.....Filename.)
/************** varHoliday **************/
tmpTbl:
NoConcatenate
LOAD Chr(39) & Concat(Holiday,Chr(39)&','&Chr(39))&Chr(39) as fieldHoliday
Resident tblHoliday;
LET varHoliday = Peek('fieldHoliday',0,'tmpTbl');
and then using below function inside table load:
NetWorkDays([Start Date],[End Date],$(varHoliday)) as WorkingDays