How to compare dates in the same list?

Apologies if this has been asked before, but I’ve struggled to find an answer that can help.

I have a list of dates that I want to compare, they have bay numbers and the date/time that the product went into the bay. Different work is done in each bay, and the bays do not have to go in number sequence, and can be in any order.

image

This image shows all of the bays and the time the product entered the bay.

Once sorted into date order, the sequence of bays for this particular product is Bay 1, 2, 4, 3, 5, 6, 8, 10, 7, 9.

I want to be able to see the difference between the two dates in order of when they occurred, and then sum the total.

Is this possible, or am I barking up the wrong tree?

How fine grained does your difference need to be? Down to the second?

Down to minutes would be preferable, but I could deal with hours :slight_smile:

Combine the TimeBetween and Previous Functions:

= TimeBetween( Previous( [Date In] ) ; [Date In] ; MinutePeriod )

Note, depending on your overall data, you may need to add a reset dimension to the previous function to reset it based on your overall event for the various bay activities.

Valid period options are:
DayPeriod, WeekPeriod, MonthPeriod, QuarterPeriod, SemesterPeriod, YearPeriod, HourPeriod, MinutePeriod, SecondPeriod, MillisecondPeriod.

1 Like

Is TimeBetween a newer function? I knew about DateBetween, but not TimeBetween. Maybe I just never dug deep enough.

I believe the TimeBetween function was added somewhere around 4.2 SP04

1 Like