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 type of graphs we will create(for 2+years candidates)?

2361


if you were told to create many records from one record, show how you would do this using array and with proc transpose? : Sas programming

1121


: and & modifiers.

1451


what is the function of catx syntax? : Sas-administrator

1155


How do you debug and test your SAS programs?

1610


Explain bmdp procedure?

1084


How can you limit the variables written to output dataset in data step?

1380


what are the categories that sas informats are used to the place the data? : Sas-administrator

1095


What is a method for assigning first.VAR and last.VAR to the BY group variable on unsorted data?

2636


how does sas handle missing values in formats? : Sas programming

1193


what is null hypothesis? why do you consider that?

2964


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

1486


what is the use of proc contents and proc print in sas? : Sas-administrator

1105


what is the effect of the options statement errors=1? : Sas programming

1105


is data integration and etl programming is same? : Sas-di

1125