Adding times

S

SHIPP

I have a beginning time and an ending time. I am using the following in the
query of the report to print out the detail.

Format([StartTime] -1 -[EndTime], "Short Time") This works fine.

Now I want to group by employee and sum the times. I have tried:

=Format(Sum([DateBegin]-1-[DateEnd]),"Short Time")
=sum([Full Time])

[Full Time] is the field name in the query.

Both give me Data Type Mismatch. Any ideas?
 
D

Duane Hookom

If you are looking for durations of time, you are better off calculating using
MinutesDuration: DateDiff("n", [StartTime],[EndTime])
This creates a numeric value which can be summed.

Using Format(...,"Short Time") converts your times to a string which can't
be summed.
 

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