Hi SAS Forum,
I have two date values like below.
03312012 /*this means March 31, 2012*/
04302012 /*this means April 30, 2012*/
Q: I wanted to convert these two values to display like below.
03/31/2012
04/30/2012
I googled and found if the date is in format like this, i.e. 03312012, 04302012 etc., it is called MMDDYYN8.
So, I have used below approach for my intended conversion.
data have;
informat date MMDDYYN8.;
input date;
format date MMDDYY10.;
cards;
03312012
04302012
;
run;
Problem:
SAS complains like below …..
16 informat date MMDDYYN8.;
_________
485
NOTE 485-185: Informat MMDDYYN was not found or could not be loaded.
Could anyone let me know what informat then should I specify to read dates in these date formats, i.e. 03312012, 04302012 ?
Thanks
Miris
data have;
input date MMDDYY8.;
format date MMDDYYN8.;
cards;
03312012
04302012
;
run;
MMDDYYN8. is format, not informat
I think the informat is MMDDYY8. without the N. Normally the N in a date format means no delimiters.
data have;
input date MMDDYY8.;
format date MMDDYYN8.;
cards;
03312012
04302012
;
run;
MMDDYYN8. is format, not informat
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.