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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to do the Time Calculation on the Report 1

Status
Not open for further replies.

jen1701

Programmer
Dec 20, 2003
57
US
I have a report grouped by Top/Bottom. I want to calculate the time between each record within the group. I also want to calculate the total duration within the group.
e.g.
Top
2/3/2004 08:34:23am
2/3/2004 01:23:56pm
2/4/2004 03:12:35pm

I want to calculate 2/3/2004 01:23:56pm-2/3/2004 08:34:23am.
I also want to calculate 2/4/2004 03:12:35pm-2/3/2004 08:34:23am.

I guess I can use datediff, but how can I store the 1st date and 2nd date and so on within the group.

Please Help!!!! I have tried many ways but getting no where.

Thank you in advance.

Jen
 
I don't see any "grouping field" so it is difficult to explain how to calculate the "running diff". I would do this in the query.

To get the total duration (in minutes) in a group footer, add a text box:
=DateDiff("n", Min([UnnamedDateField]), Max([UnnamedDateField]))

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Hi Duane,

Thank you so much for your reply. I will try your suggestion.

Jen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top