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;
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;
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.
use a format. https://documentation.sas.com/doc/en/vdmmlcdc/8.1/ds2ref/p1deinudjfd5dan1r5xoanxqnfsk.htm
a=put(18985,monyy7.);
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.