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

Total Hours in 1 week worked

Status
Not open for further replies.

scoombs

Technical User
Jan 31, 2005
11
GB
There are a few forums on here that talk about this but not found one that hits the nail on the head.

I have a field for each day of the week where the total hours worked are entered (hh:nn)

I want to be able to add all these up! Using a time field this posses a problem cause it will only go up to 23:59.

EG:

Monday 4:00
Tueday 4:00
Wednes 4:00
Thursd 4:00
Friday 4:00
Saturd 4:00
Sunday 0:16

TOTAL: 24:16

How can I do this, I am familiar with DateDiff and most of the other MS Access Time Functions but none do the job I want!

Can anyone help?

Look forward to responds!
 
A starting point:
SELECT (24*Int(Monday+...+Sunday)+Format(Monday+...+Sunday,'h')) & Format(Monday+...+Sunday,':nn:ss') AS TotalTime

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
This all seems good, not put it in yet but its looking like what im trying to achive.

I am entering the hours worked for each day in a form.,

On the form at the bottom I want it to add the hours for each day in a field. I uesed a formula from PVM (above) and for some reason it added all the results in the database so the number was much larger than i expectecd!

Does any one know how I can stop that happening?

Thanks.

Steve
 
Did you include a WHERE clause to restrict the query to use recrds between two dates?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top