Tom,
Thank you SO MUCH for the detailed explaination and codes. They are very helpful indeed. I coded some of in my program, it worked perfectly. Again, Thank you for looking into my post and helped me out of the woods in time.
Leigh
It could be simpler.
%LET QT=%eval(%sysfunc(today(),qtr.)-1);
%put qt=&qt;
Ksharp
Yes, it is simpler and worked. Thank you!
Why is your data step mixing macro and normal SAS functions?
If you want to use the automatic macro variable SYSDATE9 in a Data step there is normally not a need to convert it first with macro programming statements.
data quatr;
q=qtr("&sysdate9"d)-1;
run;
You're correct. I did the extra step just want to see what I would get so as qtr function can take and convert. Your code is absolute correct and effecient. Thanks a lot!
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.