Totaling time

deejay_totoro

Registered User.
Local time
Today, 09:54
Joined
May 29, 2003
Messages
169
Hello,

I am trying to calculate the total number of hours.

I started by creating an underlying query that produces a decimal total. I then use the Format option to re-format the decial value into a time value.

This is fine however, the problems occur if I try to calculate a total in a report (or a form). I sum up the decimal value as before but when I try to use Format to total a whole page worth of times, it only produces a time value in 12/24 hour format. What I really need is 25:00, 39:44, 55:32 values etc...

In Excel I would create a custom format eg: [HH]:mm to do this. Any ideas anyone?

Thanks very much,

dj_T
 
I don't know that you can get ##:## as a format, as Access will want to read that as 12 / 24 and will only want to go that high. I would suggest maybe trying a decimal. Try that from the beginning.

Then you could trick the format on the report.

How?

IIF([field]=[field],left([field],2)&":"& right([field],2),[field])

Obviously the field = the field, so it would always be true. I dont know if it would work, because I havent tested it, but it may be worth a try.
 

Users who are viewing this thread

Back
Top Bottom