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 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

Discussion stats
  • 2 replies
  • 1991 views
  • 1 like
  • 2 in conversation