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

I did this and that worked:

output out= EMpull2 (rename=(sum=QTR_COST real_date=year_qtr) ) ;

Tom
Super User Tom
Super User

What type of variable is EVENTDATE?  Run PROC CONTENTS on the source dataset and check.

Is the TYPE of the variable numeric or character?
If numeric is their any FORMAT attached to it?  What FORMAT is attached?  

If the variable is numeric with a format used for displaying dates (DATE, MMDDYY, YYMMDD, etc) then you have a date variable.  Otherwise you will need to first convert EVENTDATE into date values.

 

If your variable has a DATE value then the QTR() function will return an integer from 1 to 4.  You will need to check the YEAR of the date if you only want the first two quarters in 2021.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 17 replies
  • 1026 views
  • 4 likes
  • 6 in conversation