7 Replies Latest reply: Sep 17, 2013 10:55 AM by Stephen Matthews

# 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

• ###### Re: integer value as hours & minutes

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

• ###### Re: integer value as hours & minutes

its not working, i already used this

• ###### Re: integer value as hours & minutes

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.

• ###### Re: integer value as hours & minutes

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

• ###### Re: integer value as hours & minutes

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

• ###### Re: integer value as hours & minutes

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

• ###### Re: integer value as hours & minutes

thanks jonathan, its working