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

Announcements
FLASH SALE: Save $500! Use code FLASH2026 at checkout until Feb 14th at 11:59PM ET. Register Now!
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
tresB
Champion III
Champion III

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

tresB
Champion III
Champion III

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