Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calculating Hour for time cards. I'm Dying on this one. Help

Status
Not open for further replies.

sdimaggio

Technical User
Jan 23, 2002
138
US
Is there an "easy way" to figure out hours worked?

Everything I do looks right until I try to calculate overtime.

Start time: 9:00am - Short Time
End time: 6:00pm -short time
Lunch start: 12:00pm -short time
Lunch End: 12:30pm - short time
Adjustments: 0:15pm -short time

[Total Hrs] = [end time]-[start time] - short time format
[pay hrs] = [total hrs]-([lunch end]-[lunch start])-[adustments] -short time format

the above works, however, this is where i have my problem:

[overtime]=[pay hrs]-8

I've spent hours on this, any help would be appreciated.

Thanks






 
Here's the soloution - assumes all fields have Format set to ShortDate:

field1 name: StartTime
field2 name: EndTime
field3 name: LunchStart
field4 name: LunchEnd
field5 name: TotalHrs
field6 name: Adjustment
field7 name: PayHrs
field8 name: Overtime

Set the Control Source for the following fields:

TotalHrs =[EndTime]-[StartTime]
PayHrs =[TotalHrs]-([LunchEnd]-[LunchStart])-[Adjustments]
Overtime =Format(DateAdd("h",-8,[payHrs]),"hh:mm")

regards
Rod
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top