How to find out no. of business days in a month using
macros.???(excluding weekends and holidays).
Answer Posted / 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 View All Answers
explain what is factor analysis? : Sas-administrator
Describe a time when you were really stuck on a problem and how you solved it?
This entry was posted in General. Bookmark the permalink. Post a comment or leave
What are all the problems you faced while validating tables and reports?
what is the difference between calculating the 'mean' using the mean function and proc means? : Sas programming
Give an example where SAS fails to convert character value to numeric value automatically?
How sas treats the dsd delimiters?
Hello, I have PROC SQLs results group by 3 fields and I use SUM and COUNT functions in SQL. The problem is when I try to display my result with PROC TABULATE. I am getting very big numbers. I believe I make a mistake some where in Tabulate. Here is my Proc Tabulate. PROC TABULATE DATA=OUT04_05 FORMAT=12.; CLASS YR CENTRE VISA / PRELOADFMT EXCLUSIVE; VAR NEWUSER FRAUD TRANSFER AUTUSER REISSUE; TABLE CENTRE ALL, (YR ALL)*VISA, (NEWUSER*F=COMMA12. AUTUSER*F=COMMA12. FRAUD*F=COMMA12. TRANSFER*F=COMMA12. REISSUE*F=COMMA12.) / MISSTEXT={LABEL='0'} PRINTMISS RTS=20; FORMAT VISA VISAFMT.; KEYLABEL SUM = ' ' ALL = 'TOTAL'; LABEL YR = 'DATE YEAR' NEWUSER = 'TOTAL NEW ACCT' TRANSFER = 'TOTAL TRANSFER' FRAUD = 'TOTAL FRAUD TRANSFER' AUTUSER = 'TOTAL AUTH USERS' REISSUE = 'TOTAL REISSUE'; When I code it like : NEWUSER*N*F=COMMA12. AUTUSER*N*F=COMMA12. I get same amount numbers but to find a NEWUSER I use COUNT(*) and to find AUTUSER I use SUM(xxxx) function so both result shouldn’t be the same my problem is in this point. Could you tell me where the problem in code is. How can I display my result? TX.
I have 3 years of work experience at a startup and recently got certified in Data Science with SAS. I need to know how to get into the analytics industry
what is sas data set?
Name types of category in which SAS Informats are placed?
Why and when do you use proc sql?
What is the SAS data set?
Where do you use proc means over proc freq?
for report generation which one you used proc report or data_null_?