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 cannot read the date of this small dataset using ddmmyy10. informat. And then I also cannot display with the same date format?

This error messege pops up.

NOTE: Invalid data for date in line 20 1-9.

RULE:      ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0                    

20         3/31/2012  1 2 3

date=. a=1 b=2 c=3 _ERROR_=1 _N_=1

NOTE: Invalid data for date in line 21 1-9.

21         4/30/2012  4 5 6

date=. a=4 b=5 c=6 _ERROR_=1 _N_=2

NOTE: Invalid data for date in line 22 1-9.

         

/*

data have;

informat date DDMMYY10.;

format date DDMMYY10.;

input date a b c;

cards;

3/31/2012  1 2 3

4/30/2012  4 5 6

5/31/2012  7 8 9

6/30/2012  3 2 1

7/31/2012  6 5 3

8/31/2012  5 8 9

9/30/2012  6 5 8

10/31/2012 3 6 5

11/30/2012 5 6 4

12/31/2012 6 5 8

1/31/2013  2 5 6

2/28/2013  3 5 1

3/31/2013  2 5 4

4/30/2013  3 6 5

5/31/2013  2 5 4

6/30/2013  3 6 5

;

run;

*/

Could anyone help me.

Thanks

Mirisage

1 ACCEPTED SOLUTION

Accepted Solutions
PGStats
Opal | Level 21

That's because your data format is MMDDYY10.

PG

PG

View solution in original post

1 REPLY 1
PGStats
Opal | Level 21

That's because your data format is MMDDYY10.

PG

PG

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 1 reply
  • 2155 views
  • 0 likes
  • 2 in conversation