total hours

S

Song Su

how to total hours?

TimeIn TimeOut Hour
1/15/2007 1:20PM 1/15/2007 4:00PM 02:40
1/15/2007 4:36PM 1/15/2007 5:14PM 00:37

I use =Format([TimeOut]-[TimeIn],"Short Time") to calculate Hour column
At group footer, I want total by group. In this case, should show 03:17

How to add hour up? Thanks.
 
A

Allen Browne

See:
Calculating elapsed time
at:
http://allenbrowne.com/casu-13.html

The article explains how to add a calculated field to your query to show the
duration in minutes. In the Report Footer, you can then add a text box with
these properties:
Control Source =Sum([Minutes])
Visible No
Name txtMinutesTotal

As the article explains, you can then display that in hours and minutes with
another text box bound to:
=[txtMinutesTotal] \ 60 & Format([txtMinutesTotal] Mod 60, "\:00")
 
S

Song Su

Works perfect! Thank you.

Allen Browne said:
See:
Calculating elapsed time
at:
http://allenbrowne.com/casu-13.html

The article explains how to add a calculated field to your query to show
the duration in minutes. In the Report Footer, you can then add a text box
with these properties:
Control Source =Sum([Minutes])
Visible No
Name txtMinutesTotal

As the article explains, you can then display that in hours and minutes
with another text box bound to:
=[txtMinutesTotal] \ 60 & Format([txtMinutesTotal] Mod 60, "\:00")

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Song Su said:
how to total hours?

TimeIn TimeOut Hour
1/15/2007 1:20PM 1/15/2007 4:00PM 02:40
1/15/2007 4:36PM 1/15/2007 5:14PM 00:37

I use =Format([TimeOut]-[TimeIn],"Short Time") to calculate Hour column
At group footer, I want total by group. In this case, should show 03:17

How to add hour up? Thanks.
 

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