Hi All
Can somebody help me with this?
I use this to calculate turnaround time for working days Mon. - Fry.:
TAT = intck ('weekdays', recivedate, sentdate)
Is it possible to omit bank holydays for different countries in this statement?
Thank you in advance.
Bob
You can make a interval by yourself, then use this interval at intck()
Hi Ksharp
Thank you for quick respond.
I'm not sure how to make my own intervals. I found this example for custom intervals to omit holidays when counting business days in the function INTCK:
I don't know how to adjust this to my holiday list.
options intervalds=(BankingDays=BankDayDS);
data BankDayDS(keep=BEGIN);
start = '15DEC1998'D;
stop = '15JAN2002'D;
nwkdays = INTCK('WEEKDAY',start,stop);
do i = 0 to nwkdays;
BEGIN = INTNX('WEEKDAY',start,i);
year = YEAR(BEGIN);
if BEGIN ne HOLIDAY("NEWYEAR",year) and
BEGIN ne HOLIDAY("MLK",year) and
BEGIN ne HOLIDAY("USPRESIDENTS",year) and
BEGIN ne HOLIDAY("MEMORIAL",year) and
BEGIN ne HOLIDAY("USINDEPENDENCE",year) and
BEGIN ne HOLIDAY("LABOR",year) and
BEGIN ne HOLIDAY("COLUMBUS",year) and
BEGIN ne HOLIDAY("VETERANS",year) and
BEGIN ne HOLIDAY("THANKSGIVING",year) and
BEGIN ne HOLIDAY("CHRISTMAS",year) then
output;
end;
format BEGIN DATE.;
run;
Bob
have a look at "Custom Time Intervals" at
although it belongs among doc for SAS/ETS, it applies
Peter,
I have to wonder why intervalds was moved to the ETS documentation. It has always been in the base SAS docs (e.g., http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a003252593.htm ).
Take a look at http://www.sascommunity.org/wiki/Generating_Holiday_Lists
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.