| re: Help calculating Time from Fee and Hourly Rate
Hi. The 3.6 is the time in hours expressed as a decimal value. It is derived as the ratio of the fee paid to the hourly rate:
3.6 = 90 / 25, generalised to
[Time in Hours Decimal] = [Fee Paid] / [Hourly Rate]
The 3:36 you mention is the time expressed in hours and minutes:
3.6 hours converted to hours and minutes =
3.6 * 60 minutes = 216 minutes = 3 hours and 36 minutes.
As the times you are referring to are not clock times - it is simply a total for hours:minutes, not a time of day - I would suggest that it is best to work in total minutes if you have any further calculations, or separately in hours and minutes if you don't, then combine back to hours and minutes for final presentation if need be.
The calculations are as follows.
If working in total minutes (should you need to do any other calculations such as adding the total hours from different jobs):
[Total Minutes] = [Time in Hours Decimal] * 60
[Hours] = Int([Total Minutes]/60)
[Minutes] = [Total Minutes] - (Int([Total Minutes]/60)*60)
If you do not have other values you need to add on the calculations are even simpler:
[Hours] = Int([Time in Hours Decimal])
[Minutes] = ([Time in Hours Decimal] - Int([Time in Hours Decimal]))*60
For presentation as hours:minutes on a report or somesuch, you can simply combine the hours and minutes values as follows:
[Time in Hours:Minutes] = [Hours] & ":" & [Minutes]
-Stewart ps but Linq's equivalent solution is much simpler!! |