01-13-2014 06:35 AM
I am trying to find the diff between two dates excluding weekends using intck ('weekday',date 1, date2) however i need to know how to exclude the below holidays between
'1Jan2014'D = 1
01-13-2014 07:51 AM
Hi , Try this. it excludes weekends and holidays.
input holiday date9.;
input real_date date9.;format real_date date9.;
proc sql noprint;
select holiday into :holiday separated by ',' from holiday;
set real_date(where=(weekday(real_date) not in (1,7) and real_date not in (&holiday.)));
01-13-2014 09:33 AM
Thank you Pradeep. What i am needing is that the date range will be in fiscal week : for ex :- fiscal week 201440 ( nov'13 ) till fiscal week 201448 ( dec'13) my question is do i need to list each day?
i am having a calculated function intck ('weekday',date 1, date2) which is giving the working days between fiscal week 201440 ( 2nd nov'13 ) till fiscal week 201448 ( 3rdJan'14). for the same date range i need to calculate the working days without holidays below.
01-13-2014 09:22 AM
Here's a SAS function that can do the work.
01-14-2014 02:46 PM
you need 2 different dates in some form, if you want to compare/find difference between them.
you can loop through the date range between your fiscal weeks( start date to your end date), then you don't have to list each day.