Calculate Hours and Minutes in Report....

C

Code Agent

I want to make a report that shows the total hours and minutes displayed at
the footer. I can calulate the total number of minutes between to 2 times
stored in seperate fields. ex: "Field 1" = 2:00PM, "Field 2" = 3:30PM, "Field
3" = "90". Field 3 is done by doing a DateDiff function in the control source.

I can do a running sum on "Filed 3", but I want it to be formated to display
" 1 Hour & 30 Minutes" in the footer.

I hope this makes sence. Any help would be greatly appreciated. Thanks in
advance!!
 
J

John W. Vinson

I want to make a report that shows the total hours and minutes displayed at
the footer. I can calulate the total number of minutes between to 2 times
stored in seperate fields. ex: "Field 1" = 2:00PM, "Field 2" = 3:30PM, "Field
3" = "90". Field 3 is done by doing a DateDiff function in the control source.

I can do a running sum on "Filed 3", but I want it to be formated to display
" 1 Hour & 30 Minutes" in the footer.

I hope this makes sence. Any help would be greatly appreciated. Thanks in
advance!!

DateDiff("n", [Field 1], [Field 2]) \ 60 & " hours and " DateDiff("n", [Field
1], [Field 2]) MOD 60 & " minutes"
 

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