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;

sas-innovate-white.png

Join us for our biggest event of the year!

Four days of inspiring keynotes, product reveals, hands-on learning opportunities, deep-dive demos, and peer-led breakouts. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

Register now!

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
  • 576 views
  • 0 likes
  • 3 in conversation