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

Proc import is bringing in a weird date, from 2014 to 2074.  Is there anyway to correct it after it has been imported, or via proc import?  I don't know that I can informat using proc import.  I know I can datastep informat but if I can get around that (file changes monthly) I would much prefer too.

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
Steelers_In_DC
Barite | Level 11

date is formatted yyyy/mm/dd in excel,

View solution in original post

8 REPLIES 8
Steelers_In_DC
Barite | Level 11

date is formatted yyyy/mm/dd in excel,

Reeza
Super User

Is your variable name consistent between files?

Can you post sample excel file and import code that generates the issue?

Steelers_In_DC
Barite | Level 11

the name is consistant:

Excel:

Process_date
2014/07/28

sas:

Process_date
2014/07/28
1
Steelers_In_DC
Barite | Level 11

oops

sas:

107/29/2074
Steelers_In_DC
Barite | Level 11

for the current month I used intck to come up with good_date = process_date - 21916; but that isn't anything that I would hand over to the business owner as a 'solution'.

Reeza
Super User

Your proc import code? Did you use scandate option?

Steelers_In_DC
Barite | Level 11

PROC IMPORT FILE="C:\Users\pp78499\Desktop\SOP_IMPAIRED_TREND.xls"

    OUT=Quarterly_Trend_Report

    DBMS=xls

    REPLACE;  

    SHEET="Change >5%"; scandate=no; scantime=no;

    namerow=6;

    startrow=7;

    GETNAMES=YES;

    RUN;

Reeza
Super User

And with scandate=yes what do you get?

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
  • 8 replies
  • 2469 views
  • 0 likes
  • 2 in conversation