How to display hours correctly in charts (without converting to days)

Hi everyone :waving_hand:
I’m creating a chart in Coda that shows the total hours, but when the values go over 24 hours, Coda automatically converts them into days.
For example, if I have 22h + 22h, instead of showing β€œ44h”, the chart displays β€œ1 day 20h”.

Does anyone know how to make charts display the accumulated hours as plain hours (like 44h) without converting them to days?
Thanks in advance! :folded_hands:

2 Likes

my suggestion would be to add a column to your table called Hours with the formula

ProjectDuration.ToHours().toNumber()

so it computes the hours as a plain number.

then you can use that in your chart.

max

1 Like

actually…

i believe .ToHours() returns a NUMBER and not a DURATION
so you probably do not need to add the .ToNumber() at the end.

max

but I want the chart to show something like this: 44h 30min, not like 44.50. that’s what I’m not sure can be done in Coda

1 Like

use the Format() formula to define how the hours and minutes should be displayed

Format(β€˜{1:00}:{2:00}’,DURATION.Hour(),DURATION.Minute())

This pads the hour and minute values to 2 digits each with a colon between them

1 Like

:waving_hand: @Carlos_Moreno

you can set the duration column to show only hours and then create a helper text column pointing at duration column and it will display as your intended format i.e. 44hr etc

here is the reference you can copy should you require more detail.

hope this helps!

Cheers!
Mel