# QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
cancel
Showing results for
Did you mean:
Creator II

## 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
MVP

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)

4 Replies
MVP

Why don't you try Round() function?

Creator II
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.

MVP

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)

Creator II
Author

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