Help using Base SAS procedures

Date out of range error

Reply
Frequent Contributor
Posts: 122

Date out of range error

Hi,

I have the following code:

Data test;

Dt=201210131;

Run;

Data test1;

Set test;

Dt1=put(dt,yymmdd10.);

Run;

When I run the second data step I am getting an error message:

"Date out of range"

Please share your thoughts on how to fix this error.

Thanks.

PROC Star
Posts: 7,467

Date out of range error

Correct the data!  2012 10 131?

Frequent Contributor
Posts: 122

Date out of range error

Oops..that was a typo,the date is 20120131.

PROC Star
Posts: 7,467

Date out of range error

Then try:

Data test;

  Dt=20120131;

Run;

Data test1;

Set test;

  Dt1=input(put(dt,8.),yymmdd10.);

Run;

Ask a Question
Discussion stats
  • 3 replies
  • 118 views
  • 0 likes
  • 2 in conversation