Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
raju_salmon
Creator II
Creator II

How to convert sec to interval?

Hi Expert,

In my data, time is available in seconds which should be shown in hh:mm:ss format.

I have tried using interval function but it is showing wrong result, can anyone help me on this?

Attached qvw file for reference.

Thanks,

Raju

Labels (1)
1 Solution

Accepted Solutions
tresB
Champion III
Champion III

Interval(SUM([Available Time in Sec]/24/60/60),'hh:mm:ss')

View solution in original post

6 Replies
tresB
Champion III
Champion III

Interval(SUM([Available Time in Sec]/24/60/60),'hh:mm:ss')

raju_salmon
Creator II
Creator II
Author

Perfect...Thanks a lot Tresesco.

raju_salmon
Creator II
Creator II
Author

Is there any specific reason why my expression showing wrong result for 2014,2015 and 2016... but not for 2017?

tresB
Champion III
Champion III

Is not this what you see?

Capture.JPG

raju_salmon
Creator II
Creator II
Author

If i use the expression which you suggested is working very fine and giving accurate result.

Earlier i tried with below expression, but not sure why it is not working.

Interval((Interval#((Num(SUM([Available Time in Sec]))),'SS')),'hh:mm:ss')

tresB
Champion III
Champion III

I guess it's because how qlik is handling the long numbers. It seems that number bigger than 2147483648 (which is 2^31) are being interpreted differently (may be signed bit interpretation). So the discrepancy.