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.