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).

Answers were Sorted based on User's Feedback



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

Answer / 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

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

Answer / oanhntt

first of all, identify the last day of month (using this
intnx('month',d,1)-1). after that make a loop through 1 to
end of month, check if day in loop is weekend or not, using
another variable to count this number.
Regarding to the holidays, except some popular holidays which
I suggest using an external file/dataset to track it, use
this file to identify holidays.

Is This Answer Correct ?    1 Yes 3 No

Post New Answer

More SAS Interview Questions

I need level 2 to 5 sas using companies in india

0 Answers  


what is cummaltive frequency,and varience in proc unviarte

1 Answers   L&T,


How could you generate test data with no input data?

14 Answers   CTS,


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

0 Answers  


if x=round(26.3,10)-1 then x= how much and how explain?

5 Answers   BoA,


if reading an external file to produce an external file, what is the shortcut to write that record without coding every single variable on the record

4 Answers   HSBC,


what is sas metadata server? : Sas-di

0 Answers  


What are the differences between sum function and using “+” operator?

0 Answers  


what are scrubing procedures in SAS?

1 Answers   Oracle,


What is the pound sign used for in the data_null_ ?

1 Answers  


What do you understand by the term Normal Distribution?

0 Answers  


Baseline definition in your study

3 Answers   Accenture, Quintiles,


Categories