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

Load Text Files Dynamically with Timestamp

Hello All,

I have multiple text files in the folder with different timestamp, so what I want to do is create a one qvd with a new column for date and timestamp based on the filename.

So the expected output will one qvd like:

ecrime and the associated dates and time columns

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

You should be able to do it like this:

Date(Date#(SubField(FileBaseName(), '_', 3), 'yy.MM.dd'), 'yyyy-MM-dd') as Date

Time(Round(Time#(SubField(FileBaseName(), '_', 4), 'hh.mm.ss'), 1/1440), 'hh.mm') as Date

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

2 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

You should be able to do it like this:

Date(Date#(SubField(FileBaseName(), '_', 3), 'yy.MM.dd'), 'yyyy-MM-dd') as Date

Time(Round(Time#(SubField(FileBaseName(), '_', 4), 'hh.mm.ss'), 1/1440), 'hh.mm') as Date

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
zwyne
Creator
Creator
Author

Thanks Jonathan its working