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 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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