Help using Base SAS procedures

Why cannot I read this dataset using ddmmyy10. informat ?

Accepted Solution Solved
Reply
Super Contributor
Posts: 338
Accepted Solution

Why cannot I read this dataset using ddmmyy10. informat ?

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


Accepted Solutions
Solution
‎01-31-2014 01:40 PM
Respected Advisor
Posts: 4,644

Re: Why cannot I read this dataset using ddmmyy10. informat ?

That's because your data format is MMDDYY10.

PG

PG

View solution in original post


All Replies
Solution
‎01-31-2014 01:40 PM
Respected Advisor
Posts: 4,644

Re: Why cannot I read this dataset using ddmmyy10. informat ?

That's because your data format is MMDDYY10.

PG

PG
☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 1043 views
  • 0 likes
  • 2 in conversation