BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Mirisage
Obsidian | Level 7

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

1 ACCEPTED SOLUTION

Accepted Solutions
pradeepalankar
Obsidian | Level 7

data have;

input date MMDDYY8.;

format date MMDDYYN8.;

cards;

03312012

04302012

;

run;

MMDDYYN8. is format, not informat

View solution in original post

2 REPLIES 2
DBailey
Lapis Lazuli | Level 10

I think the informat is MMDDYY8. without the N.  Normally the N in a date format means no delimiters.

pradeepalankar
Obsidian | Level 7

data have;

input date MMDDYY8.;

format date MMDDYYN8.;

cards;

03312012

04302012

;

run;

MMDDYYN8. is format, not informat

sas-innovate-2024.png

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.

 

Register now!

What is Bayesian Analysis?

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 5118 views
  • 4 likes
  • 3 in conversation