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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
conwayro
Contributor
Contributor

Timestamp Comparison Questions

Hi all,

I have  a CSV file with two timestamps in (see attached) and I'm trying to do the following at load:

  1. Create a new column in my table with as a comparison between the two timestamps in 'hh:mm' format
  2. Create an second new column with a comparison between Timestamp2 and current (now) time

I have tried lots of different ways but have been unsuccessful...and I suspect it's down to the format of the timestamp field in the CSV file

Ideas please

P.S the native table file has to be a CSV as it's an auto-output from the data source...and I cannot connect to the data source directly

1 Reply
uacg0009
Partner - Specialist
Partner - Specialist

Hi Conwayro,

After I open your csv, I saw that the timestamp1 and timestamp2 are totally same, so I think the comparison is 0 for these samples.

And for your questions, I think you can use below function to solve that:

 

1.=Interval( Timestamp1-Timestamp2, 'hh:mm' ) 
2.=Interval(Timestamp2 - now(), 'hh:mm' ) 

if not correct, please tell me what you want and it's better to give a sample.

Aiolos Zhao