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

what is study design in while working with SAS? what are screening variables in SAS?

2242


Explain translate function?

1212


what are informats in sas? : Sas-administrator

1093


Are you involved in writing the inferential analysis plan? Tables specifications?

3960


Intern stastical programmer written test

758


Enlist the functions performed by sas.

1128


Hi, Does anybody has lastest SAS certification(base, adv., clinical)dumps,if anybody has please email me at mailtorajani76@gmail.com. Thanks

2255


What is the use of divide function?

1067


What is the difference between order and group variable in proc report?

1437


Describe a time when you were really stuck on a problem and how you solved it?

2638


What are the data types does SAS contain?

1117


What is the use of the %include statement?

1173


What would be the value of month at the end of data step execution and how many observations would be there?

1149


What can you learn from the SAS log when debugging?

1385


What are the functions which are used for character handling functions?

1146