Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
rcandeo
Creator III
Creator III

How can I make this hour comparison?

Hi, I have a variable created as this:

vFinalHour = MakeTime(18);

and I have to comparisse if the calls are later than this final hour (18:00:00)

The CallHour field (that is timestamp) is defined as this in the script load:

time(Date_Call,'hh:mm:ss') as CallHour

If I try to make this comparisson:

If(CallHour > vFinalHour,0,vFinalHour - CallHour)

I receive 0, as all my CallHour was bigger than 18:00:00 hs and this is not true, as If I make the calculation only:

vFinalHour - CallHour I have good results, excepting when CallHour > vFinalHour.

Anyone can help me doing the correct comparison please:

1 Solution

Accepted Solutions
rcandeo
Creator III
Creator III
Author

worked using num# function:

num#(CallHour ) > num#(vFinalHour)

Thank You

View solution in original post

2 Replies
Anonymous
Not applicable

Hi,

try to use num function like num(CallHour ) > num(vFinalHour)

Regards

Ashok.

rcandeo
Creator III
Creator III
Author

worked using num# function:

num#(CallHour ) > num#(vFinalHour)

Thank You