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;

SAS Innovate 2025: Call for Content

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 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 424 views
  • 0 likes
  • 3 in conversation