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.
date is formatted yyyy/mm/dd in excel,
date is formatted yyyy/mm/dd in excel,
Is your variable name consistent between files?
Can you post sample excel file and import code that generates the issue?
the name is consistant:
Excel:
Process_date |
2014/07/28 |
sas:
Process_date | |||||||
2014/07/28 | |||||||
1 |
---|
oops
sas:
1 | 07/29/2074 |
---|
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'.
Your proc import code? Did you use scandate option?
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;
And with scandate=yes what do you get?
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.