BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
1 ACCEPTED SOLUTION

Accepted Solutions
maguiremq
SAS Super FREQ

Assuming that's the only date pattern you have.

data have;
	date = input("201904", yymmn6.);
	date_want = mdy(month(date), 22, year(date));
	format date yymmn6. date_want date9.;
run;

maguiremq_0-1655205359295.png

 

View solution in original post

3 REPLIES 3
maguiremq
SAS Super FREQ

Assuming that's the only date pattern you have.

data have;
	date = input("201904", yymmn6.);
	date_want = mdy(month(date), 22, year(date));
	format date yymmn6. date_want date9.;
run;

maguiremq_0-1655205359295.png

 

Kurt_Bremser
Super User

We can only supply useful code if we can see the data or have a very clear, unambiguous description of it.

So we need to know, apart from the value you see, the attributes of the variable. Type and assigned display format are essential.

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

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 3 replies
  • 1280 views
  • 2 likes
  • 4 in conversation