Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
advaitmodak
Contributor
Contributor

Date from file name and format.

Hi, 

I am trying to extract Date from a filename in excel

Sample file name: '2018-01-07 text1 text2 text3'

I am trying to convert this date from the above format to a MM/DD/YYYY format as well.

Could someone please help me with that? 

Thanks! 

 

Labels (2)
2 Replies
Vegar
MVP
MVP

Try something like this

First 1

Load

Date( Date#(Subfield(FileBaseName(), ' ', 1),'YYYY-MM-DD'), 'MM/DD/YYYY') as FileDate

From '2018-01-07 text1 text2 text3' ;

advaitmodak
Contributor
Contributor
Author

I am using trace in a loop for a bunch of files. I tried your method but it is not able to load.