format time greater than 24 hours

C

css

I have a running sum in my report that is formatted as a short time. Once the
sum becomes greater that 24:00, it resets to zero.

How can I display 25:37 in my report?

Thanks,
Connie
 
A

Allen Browne

Use DateDiff() to get the number of minutes.

Set up a text box in the report footer, with these properties:
Control Source =DateDiff("n", #0:00#, Sum([YourTimeFieldNameHere]))
Format General Number
Visible No
Name txtMinutes

Now place another text box in the same section, with Control Source:
=[txtMinutes] \ 60 & Format([txtMinutes] Mod 60, "\:00")

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

css

Thanks, Allen!!

Allen Browne said:
Use DateDiff() to get the number of minutes.

Set up a text box in the report footer, with these properties:
Control Source =DateDiff("n", #0:00#, Sum([YourTimeFieldNameHere]))
Format General Number
Visible No
Name txtMinutes

Now place another text box in the same section, with Control Source:
=[txtMinutes] \ 60 & Format([txtMinutes] Mod 60, "\:00")

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

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

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

css said:
I have a running sum in my report that is formatted as a short time.
Once the sum becomes greater that 24:00, it resets to zero.

How can I display 25:37 in my report?

Thanks,
Connie
 
Joined
May 17, 2012
Messages
6
Reaction score
0
This is a great fix, thanks, except when I try to view the report I get a prompt to enter a perameter value for textminutes. Did I do something wrong?
Melissa
 
Joined
May 17, 2012
Messages
6
Reaction score
0
Never mind. I named the text box "TextMinutes" instead of "TxtMinutes". Fixed it and now it's working beautifully.
Thank you for posting this!
Melissa
 

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