Calculating Elapsed Time and Pay Rate (DB)

This information was provided by Claris Corporation on 16 March 1998, and incorporated into Apple Computer's Tech Info Library.
If you have a ClarisWorks database with two time fields (StartTime and EndTime) and you wish to calculate a pay rate based on the elapsed time, here are calculations to accomplish that goal:

If you don't already have the following fields defined, create them:

StartTime (time)
EndTime (time)

Now to calculate the total elapsed time, define the following field:

ElapsedTime (calculation, number result)
=TIMETOTEXT('EndTime'-'Start Time',2)

See TechInfo Brief entitled "Calculating Elapsed Time" for a full explanation.

Next assuming the hourly rate is $20 an hour, create the next field:
PayDue (Calculation, Number result)
=((HOUR('end time')+MINUTE('end time')/60)-(HOUR('start time')+MINUTE('start time')/60))*20

If hourly rate is a constant other than $20, Substitute the last number (*20) for the constant hourly amount.

To provide for a variable hourly rate (different for every record), create another field:
HourlyRate (Number)

The PayDue calculation can then be modified to:
PayDue (Calculation, Number result)

=((HOUR('end time')+MINUTE('end time')/60)-(HOUR('start time')+MINUTE('start time')/60))*HourlyRate.

Published Date: Feb 18, 2012