Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Summing Minutes on Report 3

Status
Not open for further replies.

Focusfocs

Programmer
May 3, 2004
35
US
Hello, I am wondering how to allow a summary of time on a report. I have a field in my query which calculates the minutes, but I can't seem to get the formatting or syntax right on the report. What I would like is for the elapsed minutes to be displayed in the report footer in days, hours and minutes...Can this be done...I tried to put this in an unbound textbox but have datatype mismatch errors when I do so...Thank you
=Sum([MinutesInOut]\60 & ":" & Format([MinutesInOut] Mod 60,"00"))
 
Hows this?

Hours an Minutes:

Code:
=(Sum([MinutesInOut])\60) & ":" & (Sum([MinutesInOut]) Mod 60)

-Pete
 
Thanks Pete! I wish I could give you more than 1 star! Do you by chance know how I could calculate it to show also the days...so that at the end of the report it will show the days, hours and minutes..??
Oh thank so much...
 
Alright, Try this:

Days, Hours, and Minutes:
Code:
=(Sum([MinutesInOut])\1440) & " Days, " & ((Sum([MinutesInOut] Mod 1440)\60) & " Hours, And " & ((Sum([MinutesInOut] Mod 1440) Mod 60) & " Minutes"


-Pete
 
snap! sorry...i forgot a few Parenthesis:

Code:
=(Sum([MinutesInOut])\1440) & " Days, " & ((Sum([MinutesInOut]) Mod 1440)\60) & " Hours, And " & ((Sum([MinutesInOut]) Mod 1440) Mod 60) & " Minutes"



-Pete
 
Thanks a million Pete! You know I looked and found a module on Microsoft's website that had a much more code than this and I still couldn't get it to work??? You did a magnificent job! Thank you...and best yet I understand why it does what it does!! (I can only give you one star...but I wish I could give you more! *******************************************************************)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top