New SAS User

Completely new to SAS or trying something new with SAS? Post here for help getting started.
BookmarkSubscribeRSS Feed
RADAGBE9
Fluorite | Level 6

I have a folder containing multiple excel files that I need to read and combine to one single SAS dataset. Is there a way I can add the modified date and time in my dataset?

For example:

if the excel workbook was saved in a folder on 12/23/19 6:00 AM, can we include " 12/23/19 6:00 AM"  in the dataset?

 

Thanks

2 REPLIES 2
japelin
Rhodochrosite | Level 12

how about this code?

 

%let target=c:\temp;/* specify target folder including xls files. */
filename cmd pipe "dir /s &target | findstr .xls";
data xlslist;
  infile cmd;
  length dtc $17;
  input;
  dtc=substr(_infile_,1,17);
run;