Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm looking for a way to convert second to time fomat in qlikview similar to sql sec_to_time function
For example.
sec_to_time(264) => 00:04:24
How can I convert 264 seconds in qlikview to show result as 00:04:24
interval(interval#(YourSecondsFieldName, 'ss.fff'), 'hh:mm:ss.fff')
If you want to round the milliseconds then... interval(interval#(YourSecondsFieldName, 'ss.fff'), 'hh:mm:ss')
Try this expression...
interval(interval#(YourSecondsFieldName, 'ss'), 'hh:mm:ss')
This should work if your seconds field is simply the number of seconds...i.e. 264, 300 etc.
Hope that helps
interval(264/86400), where 264 is your expression and 86400 is fixed (24 * 60 * 60) seconds a day
this one is almost working ... but for some second that is a real number
264.11111111111111111111 ... for example it gave me - null
but if
264.00 this works fine. how can I correct this ?
Thank you
this one is almost working ... but for some second that is a real number
264.11111111111111111111 ... for example it gave me - null
but if
264.00 this works fine. how can I correct this ?
Thank you @Christian Ventriglia
i tried "=interval(264.11111111111111111111/86400)" and i got "0:04:24 AM"
what version of QV are you using? mine is 11 SR2
interval(interval#(YourSecondsFieldName, 'ss.fff'), 'hh:mm:ss.fff')
If you want to round the milliseconds then... interval(interval#(YourSecondsFieldName, 'ss.fff'), 'hh:mm:ss')
yes !! thank you it works now -)
Please mark correct and helpful answers so others are able to find solutions to problems.
where exactly can I mark as correct ? I am kinda new , and I couldn't find any link or button to the "correct" answer.
Thanks