BookmarkSubscribeRSS Feed
vem
Calcite | Level 5 vem
Calcite | Level 5

Hi all,

I have a coloumn start_date and end_date 2 coloumns on dateformat9.

I need to group them according to the year for 2016,2015,2014 on  end_date

startdate                   end_date

01nov2015                 30nov2015

01apr2014                  31dec2014

01jan2015                   31oct2015

01jan2016                    31dec2016

01dec2014                    20feb2015

 

Any help will be appriciated.

Thanks.

 

 

 

 

1 REPLY 1
Astounding
PROC Star

There are a few interpretations as to what "group them" might mean:

 

  • Add a variable representing the year
  • Produce a report that lists each year separately
  • Sort the observations in order by the year

Can you be a little more specific about what you are trying to accomplish?

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1063 views
  • 0 likes
  • 2 in conversation