Skip to Content
0

Formal to find a time difference for 2 different dates

Apr 04, 2017 at 10:10 PM

50

avatar image
Former Member

4/5/2017 7:03:00 am 4/5/2017 10:28:00 am

4/5/2017 10:28:00 am 4/5/2017 1:53:00 pm

4/6/2017 7:00:00 am 4/6/2017 1:00:00 pm

4/7/2017 7:03:00 am 4/7/2017 10:28:00 am

I'm trying to find the time difference in hours & minutes from 4/5 to 4/6 and 4/6 to 4/7, but not from 4/5 to 4/5. Subtotal, subreport, formula, or summary? Please help.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Ian Waterman Apr 05, 2017 at 08:31 AM
0

You need to group data on Data (excluding time).

Use a variable to capture date time of first date time record and last datetime record of next day, this variable formula will evaluate in the group header.

Then use datediff() to measure difference in minutes, then convert minutes to hours and minutes.

This is not going to be easy as you will need other tests to decide which datetime you want to hold in the variable and when to over write with next record. A lot will depend on how your data is structured and grouped.

Ian

Show 3 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Thanks Ian. I was afraid of that. I will use your idea and play with it.

Tom

0
Former Member

Not having any luck with this.

0

Show us what you have done and we might be able to offer some pointers.

ie. show formulae (including wher they are evaluating) and explain report grouping.

Ian

0
avatar image
Former Member Apr 05, 2017 at 04:31 PM
0

*Trying to find a time difference for 2 different dates

Share
10 |10000 characters needed characters left characters exceeded