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

where are dashboard components are created and maintained? : Sas-bi

1011


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

4572


What is PDV?

1146


How you are maintaining sas programmes in your company...any specific version control software you are using? If so, tell me the name?

2119


what do the sas log messages "numeric values have been converted to character" mean? What are the implications? : Sas programming

1270


I am preparing SAS Certified Advanced Programmer for SAS 9 in 2014. If anybody has the latest dumps for this exam, please mail me at dhiman.mukherjee@gmail.com

2710


What is the role of administrative users? : sas-grid-administration

1077


What do the sas log messages “numeric values have been converted to character” mean? What are the implications?

1188


do you need to know if there are any missing values? : Sas programming

1049


explain the main difference between the nodup and nodupkey options? : Sas-administrator

1160


Mention the difference between ceil and floor functions in sas?

1147


For a user to have access to a standard workspace server, is internal authentication alone is sufficient? : sas-grid-administration

997


If money were no object, what would you like to do?

3198


What are the data types that sas contain?

1173


Give some ways by which you can define the variables to produce the summary report (using proc report)?

1086