Convert hours to %

Hello!

I am trying to get a % remaning from hours, provided by filling a form.
I tried this formula:

(100*(HOUR([Hours Completed])+MINUTE([Hours Completed])))/(HOUR([PG Contract Hours])+MINUTE([PG Contract Hours]))

but unfortunately, it seems to not work.

For exemple, my total of PG Contract is 60:00 and my Completed is 7:58, with this formula it gives me 108, instead of 13.27.

Thank you very much in advance!

You’re adding the numerical value of hours to the numerical value of minutes.
(100*(7+58))/(60+0)

This should get you the accurate decimal by converting everything to a base of seconds first. If put this expression in a Percent column, you won’t need to do the multiply by 100 step.

((HOURS([Hours Completed])*3600.00)+(MINUTE([Hours Completed])*60.00))/((HOURS([PG Contact Hours])*3600.00)+(MINUTE(PG Contract Hours])*60.00))

2 Likes
3 Likes

Thank you @Bahbus for your formula! :slight_smile:

And Thank you @Steve for the link! :slight_smile:

Very helpful both of you!!! :smiley:

1 Like

I always forget about TOTAL time functions. I never use time math currently.

2 Likes