Click to See Complete Forum and Search --> : How to calculate the money to pay for the minutes worked by someone?


mpoincare
May 17th, 2004, 10:16 PM
I am implementing a payroll application. I need to know how to calculate the amount of money to pay someone for the minutes he works for. For instance if the person works for 8 hours and 35 minutes, and is getting paid $7.50 per hour, how do I calculate the amount of money for the 35 minutes. Muliplying 7.5*0.35=2.62 wich is not true. In fact the amount to be paid should be $3.75 for the 35 minutes. I notice that multiply 7.5*0.5=$3.75. Any help with code snippet would be welcome!

Andy Tacker
May 18th, 2004, 02:41 AM
1hour 7.500
1minute 7.500/60 = 0.125
30minutes 0.125*30 = 3.750
35minutes 0.125*35 = 4.375

or simply... (7.500/60)*35 = 4.375

so, for 8.35 hrs, you will pay 64.375$