Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Dayna
Creator II
Creator II

Formatting on Interval Values

Hello All!

Possibly a daft question, I have a value based on milliseconds, and I get my value using interval.. My expression is:

interval(floor(sum(SUN_IH_Time) / (60 * 60 * 1000) / 7.5) +
frac(sum(SUN_IH_Time) / (60 * 60 * 1000) / 7.5) * 7.5 / 24,'D-hh:mm')


or....

interval(sum((SUN_IH_Time / (24 * 60 * 60 * 1000))),'hh.mm')


But, rather than hh:mm is it possible to show it in decimal hours? so what is 08:45 is 08:75...?

Many thanks for your help!!

Kind Regards,
Dayna

3 Replies
tresesco
MVP
MVP

Hi Dayna,

Try the customized formula like this(along with your existing format):

hh+ mm/60

Regards, tresesco

Dayna
Creator II
Creator II
Author

Hello Tresesco,

Many thanks for your reply, but what do you mean exactly?

Kind Regards,
Dayna

tresesco
MVP
MVP

Hi,

you have to calculate the hour and minute separately and then implement the formula i suggested:

<blockquote><pre>NUM(interval(sum((SUN_IH_Time / (24 * 60 * 60 * 1000))),'hh') ) + <pre>NUM(interval(sum((SUN_IH_Time / (24 * 60 * 60 * 1000))),'mm'))/60
used NUM for being on safer side in the issue of data type.
Regards, tresesco