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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Time Difference

Hi All,

I have two Fields start Time and End Time.i need to find the the difference between the Time in HH:MM:SS format. But the fields are not in the Time format(ie. if it is 10:16:25,then the field contains the value as 101625). How can I achieve the same. pls suggest.

Thanks in Advance.

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

=Interval(Time(Time#([End Time],'hhmmss'),'hh:mm:ss') - Time(Time#([Start Time],'hhmmss'),'hh:mm:ss'),'hh:mm:ss')

View solution in original post

3 Replies
MK_QSL
MVP
MVP

=Interval(Time(Time#([End Time],'hhmmss'),'hh:mm:ss') - Time(Time#([Start Time],'hhmmss'),'hh:mm:ss'),'hh:mm:ss')

PrashantSangle

Hi,

Try like this,

In script format it like

date(date#(startTime,'hhmmss'),'hh:mm:ss') as new_StartTime,

date(date#(endTime,'hhmmss'),'hh:mm:ss') as new_EndTime

Then use formula

like Interval(new_EndTime-newStartTime,'hh:mm:ss')

Or If you dont want to do in script level

then

=Interval(date(date#([End Time],'hhmmss'),'hh:mm:ss') - date(date#([Start Time],'hhmmss'),'hh:mm:ss'),'hh:mm:ss')

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 🙂
MarcoWedel

=Interval(Time#([End Time],'hhmmss') - Time#([Start Time],'hhmmss'),'hh:mm:ss')