Hi,
How can I transofm the number 201403 into the date 03/2014 on SAS?
Thank you
There isn't a SAS format for what you want but you can create your own (untested):
proc format;
picture MyDateFmt low-high='%0m/%y' (datatype=date);
run;
data test;
datenum = 201403;
MyDate = input(put(datenum * 100 + 1, 8.), yymmdd8.);
format MyDate MyDateFmt.;
put _all_;
run;
data _null_;
date=201403;
_date=input(put(date,6.),yymmn6.);
format _date mmyys7.;
put _all_;
run;
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.