BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
leisas
Calcite | Level 5

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

Ksharp
Super User

It could be simpler.

%LET QT=%eval(%sysfunc(today(),qtr.)-1);

%put qt=&qt;

Ksharp

leisas
Calcite | Level 5

Yes, it is simpler and worked. Thank you!

Tom
Super User Tom
Super User

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;


leisas
Calcite | Level 5

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!

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 19 replies
  • 3099 views
  • 10 likes
  • 5 in conversation