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!

Solved Solved
0 4 283
1 ACCEPTED SOLUTION

Steve
Platinum 4
Platinum 4
4 REPLIES 4

Bahbus
New Member

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))

Steve
Platinum 4
Platinum 4

Thank you @Bahbus for your formula!

And Thank you @Steve for the link!

Very helpful both of you!!!

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

Top Labels in this Space