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

Qlikview - how to compare timestamp diff with constant

Hello,

I need to check if a timestamp difference is equal or greater than a number of hours and minutes.

ex.

I have two timestamp:

01/01/2015 12:40

01/01/2015 12:05

I have to check if the difference of those 2 dates is >= 4 hours and 30 minutes

in this example I expected to get 35 minutes as time difference that is < of 4 hours and 30 minutes

How can I achieve it ?

Many thanks in advance.

BR

Andrea

1 Solution

Accepted Solutions
sunny_talwar

If these are loaded correctly as timestamps, you can just do this

TimeStamp1 - TimeStamp2 >= MakeTime(4, 30)

If not read correctly, then may be this:

TimeStamp#(TimeStamp1, 'MM/DD/YYYY hh:mm') - TimeStamp#(TimeStamp2, 'MM/DD/YYYY hh:mm') >= MakeTime(4, 30)

View solution in original post

2 Replies
sunny_talwar

If these are loaded correctly as timestamps, you can just do this

TimeStamp1 - TimeStamp2 >= MakeTime(4, 30)

If not read correctly, then may be this:

TimeStamp#(TimeStamp1, 'MM/DD/YYYY hh:mm') - TimeStamp#(TimeStamp2, 'MM/DD/YYYY hh:mm') >= MakeTime(4, 30)

agigliotti
Partner - Champion
Partner - Champion
Author

just the first one worked for me.

Many thanks.