Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
prees959
Creator II
Creator II

Get File Details

Hello,

I have a file with the following naming convention :

DailyFileUpload_20171201011506.csv 

Is it possible to extract the following into a temp table ::

DailyFileUpload as filename

20171201 as filenamedate



many thanks


Phil

3 Replies
PrashantSangle

use filename()

mid(subfield(filename(),'_',2),1,8)

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
sunny_talwar

May be like this

LOAD SubField(FileBaseName(), '_', 1) as filename,

     Date#(Left(SubField(FileBaseName(), '_', 2), 8), 'YYYYMMDD') as filenamedate

     ...

From ....

PrashantSangle

or left(subfield(filename(),'_',2),8)

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂