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-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 8 replies
  • 1967 views
  • 0 likes
  • 2 in conversation