Since SAS does not provide an informat YYMM that can read the strings generated by the YYMM format you might consider just making your own:
proc format;
invalue yymm 's/[Mm]//' (regexpe) = [yymmn6.] ;
run;
Then you could use that:
data have;
input summaryYM $7. ;
cards;
2023M01
2023M02
2023M03
2023M04
2023M05
;
data want;
set have;
date = input(summaryYM, yymm.);
format date yymm7.;
run;
proc print;
run;
Results:
... View more