Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
marksmunich
Creator III
Creator III

integer value as hours & minutes

Hello community,

I have  a calculated expression eg : sum(hours), which returns a integer value like 197   . how can i represent it like 197:00:00 or 197:00. I tried to change the format in properties-number as timestamp for this expression. but its not working. could some one help me in solving is this issue.

thanks

Mark

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Time is represented internally as a fraction of a day, so 0.25 is 6:00am (or 6 hours), 0.5 = 12:00 noon (or 12 hours).

Time() will format the fraction to a time of day. Interval will format the fraction as hours.

So in your case, you could use

     =Interval(sum(hours) / 24)

Hope that helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

7 Replies
Not applicable

Hi Mark


Within the chart properties, go to the 'Number' tab and select time.  This allows you to reformat the time as you see fit (select the Time radio button and adjust the Format Pattern).

I hope this helps - let me know how you get on.

Steve

simondachstr
Luminary Alumni
Luminary Alumni

Or use the maketime(sum(hours)) function.

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Time is represented internally as a fraction of a day, so 0.25 is 6:00am (or 6 hours), 0.5 = 12:00 noon (or 12 hours).

Time() will format the fraction to a time of day. Interval will format the fraction as hours.

So in your case, you could use

     =Interval(sum(hours) / 24)

Hope that helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
swuehl
MVP
MVP

=interval(interval#(sum(hours),'hh'),'hh:mm:ss')

marksmunich
Creator III
Creator III
Author

its not working, i already used this

marksmunich
Creator III
Creator III
Author

thanks jonathan, its working

Not applicable

It sounds like the hour simply being recognised as a number.  Use the formula below - although you may want to incorporate something into your script possibly to ensure you do not have to repeat the formula within your charts.

All the best.