How to sum up total hours

Unicon

Registered User.
Local time
Today, 19:02
Joined
Dec 24, 2009
Messages
123
Dear All,

Please see the attachment. I want to get a Sum of Duration (mean total hours for that particular date), I simply put Sum in Total field of query but it's showing some error.
Please advice.:confused:
 

Attachments

  • Sum.JPG
    Sum.JPG
    23.3 KB · Views: 164
I believe the problem is that you are trying to Sum up what essentially is text. 01:43 plus 00:44 doesn't make sense because Access thinks they are both text and not time.

What you need to do is change duration to this:

DateDiff("n",[StartTime],[EndTime])

If you sum that field it will calculate correctly. Of course the result will be 147 not 02:27. For that you'll have to build a custom formatting function.
 

Users who are viewing this thread

Back
Top Bottom