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 type of graphs we will create(for 2+years candidates)?
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
: and & modifiers.
what is the function of catx syntax? : Sas-administrator
How do you debug and test your SAS programs?
Explain bmdp procedure?
How can you limit the variables written to output dataset in data step?
what are the categories that sas informats are used to the place the data? : Sas-administrator
What is a method for assigning first.VAR and last.VAR to the BY group variable on unsorted data?
how does sas handle missing values in formats? : Sas programming
what is null hypothesis? why do you consider that?
What is the difference between order and group variable in proc report?
what is the use of proc contents and proc print in sas? : Sas-administrator
what is the effect of the options statement errors=1? : Sas programming
is data integration and etl programming is same? : Sas-di