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

Time Greater than 24 hours 1

Status
Not open for further replies.

TripperTim

Technical User
May 23, 2004
6
US
I am working on a database where different activities are entered in a field 'Time' which I then sum for a total cumulative time. I am using format hh.nn.ss and the total wraps back to 0 at 24 hours. What is a good way to get a cumulative time back such as 38:10:05?
 
Something like this ?
SELECT (24*Int(Sum(theTable.Time))+Format(Sum(theTable.Time),'h')) & Format(Sum(theTable.Time),':nn:ss') AS TotalTime

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
I will have to apologize for my lack of knowledge, but the SQL code above is causing my Access to crash. I changed "theTable" to my table name, but am not sure what else to change to get this to work. When I try to save the query I get a "Syntax error (missing operand) in query expression ...." Any ideas what I did wrong.
 
It was just a partial snippet of the query !
Can you please post the SQL you have so far (crashing Access) ?

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Sorry for the delay. Had to eat dinner. I realized I needed to add "From theTable" to the end of the code and now it is working perfect. Thanks!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top