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

 

Hi guys,

 

My data SUMDATE is like below: I want to combine year and month into a single date column as "monyyyy" (Mar2011 as example).  year and month are all numeric. 

yearmonthcases
2011134
2011244
2011356
2011445
2011533
2011644
2011755
2011866
2011932
20111052
20111154
20111256
2012158
2012260
2012362
2012464
2012566
2012668
2012770
2012872
2012974
20121076
....more lines.........

 

What I want is like this:

date1cases
Jan201134
Feb201144
Mar201156
Apr201145
more lines...........

 

Any help would be appreciate!!!

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26
data want;
    set have;
    date1=mdy(month,1,year);
    format date1 monyy7.;
    drop year month;
run;
--
Paige Miller

View solution in original post

2 REPLIES 2
PaigeMiller
Diamond | Level 26
data want;
    set have;
    date1=mdy(month,1,year);
    format date1 monyy7.;
    drop year month;
run;
--
Paige Miller

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 2 replies
  • 2679 views
  • 1 like
  • 2 in conversation