Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to find out no. of business days in a month using
macros.???(excluding weekends and holidays).

Answer Posted / aaa

%MACRO WORKDAYS(START,END);

DATA _NULL_;
FORMAT A B DDMMYY10.;
A = %SYSFUNC(INPUTN(&START,DDMMYY10.));
B = %SYSFUNC(INPUTN(&END,DDMMYY10.));
COUNT=0;

DO I = A TO B;
IF WEEKDAY(I) IN (2,3,4,5,6) THEN
COUNT=COUNT+1;
END;

PUT 'NUMBER OF WORKING DAYS BETWEEN ' A 'AND ' B '= ' COUNT;
RUN;

%MEND;

%WORKDAYS(01/10/2014,31/10/2014);

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you delete duplicate observations in sas?

1011


What are the ways in which macro variables can be created in sas programming?

1032


name several ways to achieve efficiency in your program? : Sas programming

987


what are input dataset and output dataset options? : Sas programming

1026


what is data governance? : Sas-di

972


Difference between sum function and using “+” operator?

1087


Explain the main difference between the sas procedures and functions? : Sas-administrator

1015


How do you test for missing values?

1567


How to specify variables to be processed by the freq procedure?

1029


This entry was posted in General. Bookmark the permalink. Post a comment or leave

4527


how can you import .csv file in to sas? : Sas programming

1047


what is business intelligence? : Sas-bi

1014


which date functions advances a date time or date/time value by a given interval? : Sas programming

905


What is SAS informats?

1057


what is the different between functions and procs that calculate the same simple descriptive statistics? : Sas programming

994