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!

Time Clock: Elapsed time problem.

Status
Not open for further replies.

scorpio1769

Programmer
Apr 11, 2001
38
US
I'm creating a time clock application for my employees and here's my problem.

I have 2 date time fields: [start] and [end]. I've created a report that displays time worked per day, grouped by employee. In my employee group footer, I want to display the total time for that employee for each day worked. to do this, I've created a running total over the group which is based on '=Format(Sum(([End])-TimeValue([Start])),"Short Time")'. This works just dandy for any sum of hours less than 24. For example, Employee A who worked 12 hours 57 minutes displays as 12:57. However, I'm losing 24 hours for any employee who's total is greater than 24 hours. For example, Employee B who worked 30 hours 11 minutes displays as 6:11, which is the result subtracting 24 hours from the total (30 - 24 = 6).

How do I display total hours on a scale greater than 0 - 23?

thanks
 
Use datediff:

?datediff("n",#5/20/2003 8:00:00 AM# , #5/21/2003 10:30:00 PM#)

Returns 2310 minutes

Divide by 60

Returns 38.5 hrs
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top