How do I sum a series of times without an overflow?

G

Guest

I have found the difference with time periods "7:00AM MINUS 2:00AM, formated
the "raw" result into an understandable result by using
"Format([departed]-[arrived]/24, 'hh:nn:ss")". Suming the result of this
formated difference by using the "raw" result, using the above format
statement works until there is an overflow, apparetnly when the "sum" of the
difference is more than 24 hours. Has anyone solved this situation in a
group footer or report footer?
 
R

Rick Brandt

Lindy said:
I have found the difference with time periods "7:00AM MINUS 2:00AM,
formated the "raw" result into an understandable result by using
"Format([departed]-[arrived]/24, 'hh:nn:ss")". Suming the result of
this formated difference by using the "raw" result, using the above
format statement works until there is an overflow, apparetnly when
the "sum" of the difference is more than 24 hours. Has anyone solved
this situation in a group footer or report footer?

Access DateTimes are for storing points in time, not an amount of time, thus
your difficulty. For durations, it is better to use a numeric type to hold
the number of seconds and then use a calculation after any aggregation that
displays the result in an hh:nn:ss format.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top