Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Interval difference -0:00 instead of 0:00

Hello,

I have 2 time expressions A and B. Sometimes the time difference can be less than zero, but when the difference is zero, I am getting -0:00 instead of 0:00 and when I export the data to excel, I get #####. A and B expression values come from crazy scripting(SQL and QlikView programming mix) so I was thinking if I can modify the C expression on the chart itself to get 0:00 instead of -0:00. C is a expression where I am just doing B-A and have set it to interval: h:mm format. Can someone please help if you know of a solution? I tried IF(B-A = "-0:00", "0:00",B-A), but that still gives -0:00.

ABC
10/17/2017 11:2810/17/2017 11:28-0:00

Thank you.

1 Solution

Accepted Solutions
sunny_talwar

I mean this is how I would check something like this... I have not tested this, but if your are checking for seconds, then try this:

If(Round(B-A, 1/86400) = 0, '0.00', B-A)

for minutes

If(Round(B-A, 1/1440) = 0, '0.00', B-A)

View solution in original post

4 Replies
sunny_talwar

Why don't you try Round() function?

Anonymous
Not applicable
Author

Hi Sunny,

I haven't used round function in QlikView yet. Do you think with round function I will still be able to get the negative time difference? Also, will it still consider the seconds difference? Time difference on this application is so important for improvement so I can't even ignore the seconds differences.

Thanks.

sunny_talwar

I mean this is how I would check something like this... I have not tested this, but if your are checking for seconds, then try this:

If(Round(B-A, 1/86400) = 0, '0.00', B-A)

for minutes

If(Round(B-A, 1/1440) = 0, '0.00', B-A)

Anonymous
Not applicable
Author

Amazing as always. Is there anything on QlikView that you can't solve? haha thanks again Sunny.