Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
IMPORTANT security patches for GeoAnalytics Server available to download: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
star_limit
Creator II
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
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?

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

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)

star_limit
Creator II
Creator II
Author

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