Help using Base SAS procedures

INTCK Holidays

Reply
Contributor
Posts: 60

INTCK Holidays

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

Super User
Posts: 9,676

INTCK Holidays

You can make a interval by yourself, then use this interval at intck()

Contributor
Posts: 60

INTCK Holidays

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

Valued Guide
Posts: 2,175

INTCK Holidays

have a look at "Custom Time Intervals" at

http://support.sas.com/documentation/cdl/en/etsug/63939/HTML/default/viewer.htm#etsug_intervals_sect...

although it belongs among doc for SAS/ETS, it applies

PROC Star
Posts: 7,363

INTCK Holidays

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 ).

Regular Contributor
Posts: 184

INTCK Holidays

Ask a Question
Discussion stats
  • 5 replies
  • 1473 views
  • 3 likes
  • 5 in conversation