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

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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