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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Interval Time between two times

I need to find the time lapsed between two times which are basically the start and end times, and display it(Table) in the "hhmmss' Format.
1. 12:55:54 PM

2. 12:59:45 PM

1 Solution

Accepted Solutions
MarcoWedel

Interval(Time2 - Time1, 'hhmmss')

View solution in original post

3 Replies
MarcoWedel

Interval(Time2 - Time1, 'hhmmss')

MarcoWedel

If your time fields are text, then

Interval(Time#(Time2, 'hh:mm:ss TT')-Time#(Time1, 'hh:mm:ss TT'),''hhmmss')

either in a straight table or in the load script as:

Interval(Time#(Time2, 'hh:mm:ss TT')-Time#(Time1, 'hh:mm:ss TT'),''hhmmss') as Interval

its_anandrjs
Champion III
Champion III

You can write like

LOAD

Time#(start,'hh:mm:ss TT') as start,Time#(end,'hh:mm:ss TT') as end,

Interval(Time#(end,'hh:mm:ss TT') - Time#(start,'hh:mm:ss TT'),'hh:mm:ss') as Diff;

LOAD * Inline [

start,end

12:55:54 PM,12:59:45 PM   ];

Or you can direct use

Interval(Time#(end,'hh:mm:ss TT') - Time#(start,'hh:mm:ss TT'),'hh:mm:ss')

Or

Interval(end - start 'hh:mm:ss')

Regards

Anand