so I have a code like this
%let fdate=%sysfunc(today());
%put %sysfunc(putn(&fdate,MMDDYYD10.));
%let ydate=%eval(&fdate-1);
%put %sysfunc(putn(&ydate,MMDDYYD10.));
AND it seems working
127 %let fdate=%sysfunc(today());
128 %put %sysfunc(putn(&fdate,MMDDYYD10.));
SYMBOLGEN: Macro variable FDATE resolves to 22152
08-25-2020
129 %let ydate=%eval(&fdate-1);
SYMBOLGEN: Macro variable FDATE resolves to 22152
130 %put %sysfunc(putn(&ydate,MMDDYYD10.));
SYMBOLGEN: Macro variable YDATE resolves to 22151
08-24-2020
but I am using like this.
proc import datafile = "S:csse_covid_19_daily_reports\&ydate..csv"
out = T0824
dbms = CSV
REPLACE;
GUESSINGROWS=100000;
run;
The error message is showing like this.
\csse_covid_19_daily_reports\22151.csv.
ERROR: Import unsuccessful. See SAS Log for details.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE IMPORT used (Total process time):
real time 0.02 seconds
cpu time 0.01 seconds
They converted back to 22151.
I have a file like this
so to pull this file in proc import, I want format like 8-24-2020. so I can get data from CSV to sas.
How can I fix the code?
Thanks