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
what is study design in while working with SAS? what are screening variables in SAS?
Explain translate function?
what are informats in sas? : Sas-administrator
Are you involved in writing the inferential analysis plan? Tables specifications?
Intern stastical programmer written test
Enlist the functions performed by sas.
Hi, Does anybody has lastest SAS certification(base, adv., clinical)dumps,if anybody has please email me at mailtorajani76@gmail.com. Thanks
What is the use of divide function?
What is the difference between order and group variable in proc report?
Describe a time when you were really stuck on a problem and how you solved it?
What are the data types does SAS contain?
What is the use of the %include statement?
What would be the value of month at the end of data step execution and how many observations would be there?
What can you learn from the SAS log when debugging?
What are the functions which are used for character handling functions?