Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
renjithpl
Specialist
Specialist

Load Field from the file name

I have a question.

is it possible to take excel file name as a field.

Actually i have lot of files coming in daily basis. i need a field called "Date" where the date column should read from the file name.

eg. file names (12/02/2009, 1203/2009, . . . .n times)

* I know how to load data from multiple xls files.

Please help me...

1 Solution

Accepted Solutions
renjithpl
Specialist
Specialist
Author

Awesome !!!! Thanks a lot. 🙂

View solution in original post

4 Replies
Not applicable

Hi Ranjith,

You can use Filename() or Filebasename() function to get the file name of the excels.

-Peterson

renjithpl
Specialist
Specialist
Author

HI Kevin,

its working fine, but the problem is, my file name will be in this format (12-Nov-2009).

I just want to change the same file name into 'MM-DD-YYYY' format.

I used the below formula, but its not working properly:



Date

(Filebasename(), 'MM-DD-YYYY') as Date, //this is the formula...

LOAD

Not applicable

Hi,

You can use below code.


Date(Date#(FileBaseName(),'DD-MMM-YYYY'),'MM-DD-YYYY') as Date, // Untested Code


-Peterson

renjithpl
Specialist
Specialist
Author

Awesome !!!! Thanks a lot. 🙂