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
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.