Time Calculations? I have a column for Deliv...

Time Calculations?

I have a column for Delivery Time (Type = Time) - this is a specified time that delivery should take place. I have an additional column called Actual Time (Type = ChangeTimestamp) - This is the actual time the delivery took place.

How can I calculate the difference between the 2 times?

Delivery Time = 10:49:28 AM Actual Time = 23/03/2018 12:21

Thanks in advance

0 2 321
2 REPLIES 2

@Jim_Davidson

You can use an expression like the following. It takes the DeliveryTime and converts it into a DateTime. It then subtract the two DateTime values.

[ActualTime]-(TODAY() + ([DeliveryTime] - โ€œ00:00:00โ€))

Although the expression works, I think it would be better to make DeliveryTime a DateTime column. This has two advantages:

  1. It allows you to capture the delivery date so you avoid problems when the two DateTimes are not on the same date.

  2. It makes the expression more obvious. You are simply subtracting two DateTime values to yield a Duration value.

@Philip_Garrett_Appsh Thank you - I took your advice and made the delivery time a date time column which works so much better. Thank you.

Top Labels in this Space