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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calculating Total Time

Status
Not open for further replies.

camelk

Technical User
Mar 19, 2002
26
US
I have 2 flds: StartTime and EndTime (both formatted as short). I calculated the total number of hours worked by finding the difference between the StartTime and EndTime (no problem works fine). Now I need to add-up all the hours and minutes for a particular individual I wrote a query that selects all the records for a particular individual (works fine)and used "sum" to add all the hours and minutes for that indvividual. Problems is that it adds only the hours and not the minutes. How do I write a calculation so that the minutes as well as the hours are added.
Thanks
 
Try summing up the total time using minutes only. I'm assuming you're using a DateDiff function to get the difference between the start and end times. Divide the result by 60 to get hours.
 
Help I am so lost. This was how I arrived at the difference between EndTime and StartTime
TotTime: Format([EndTime]-[StartTime],"h:nn")
The results was in short format. How would I write this using DateDiff...and ....then total find the total of all hour worked. Please can someone help me?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top