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
where are dashboard components are created and maintained? : Sas-bi
This entry was posted in General. Bookmark the permalink. Post a comment or leave
What is PDV?
How you are maintaining sas programmes in your company...any specific version control software you are using? If so, tell me the name?
what do the sas log messages "numeric values have been converted to character" mean? What are the implications? : Sas programming
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
What is the role of administrative users? : sas-grid-administration
What do the sas log messages “numeric values have been converted to character” mean? What are the implications?
do you need to know if there are any missing values? : Sas programming
explain the main difference between the nodup and nodupkey options? : Sas-administrator
Mention the difference between ceil and floor functions in sas?
For a user to have access to a standard workspace server, is internal authentication alone is sufficient? : sas-grid-administration
If money were no object, what would you like to do?
What are the data types that sas contain?
Give some ways by which you can define the variables to produce the summary report (using proc report)?