Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

svante
New Contributor

Calculating time diff in Qlikview

Hi, this q has not been answered in this forum but many people must struggle with this:

Q: how to calculate time diff in script?

Ex Calc time between 2 loops. This is how I do it. Any comments and risk with this? I notcied that neg values doesnt go well, so u have to check for that or trust the data.

Time(Time(departure_loop1) - (Time(arrival_loop1))) as Diff_Dep1_Arr1

I would appreciate a "TimeDiff" function!

Regards





Tags (1)
1 Solution

Accepted Solutions
Not applicable

Calculating time diff in Qlikview

Use the Interval() function

Interval(arrival_loop1 - departure_loop1, 'hh:mm:ss')

View solution in original post

3 Replies
Not applicable

Calculating time diff in Qlikview

Use the Interval() function

Interval(arrival_loop1 - departure_loop1, 'hh:mm:ss')

View solution in original post

svante
New Contributor

Calculating time diff in Qlikview

Big THX!! More elegant solution.

Yes

hubertdudek
New Contributor III

Re: Calculating time diff in Qlikview

This solution will crush when departure is exactly at midnight or after it as