Hey Jason,
If you didn’t sort this out, this is how you do it:
First, you need to extract the hours. To do this, you use the time difference rounded down to the nearest hour. That requires the Floor function
Arrival time - departure time:floor
Next, you need to extract the minutes. To do this, you use the Modulo function. Modulo is the remainder after dividing one number by another
Arrival time - departure time:rounded to minutes modulo 60
So lets say a plane takes off at 2:02pm and arrives at 4:15pm. That is:
-
4-2 rounded down to nearest hour = 2
-
4.15pm - 2.02pm rounded to minutes = 133 minutes
The modulo of 133 / 60 minutes = 13 mins.
=> So the difference is 2hrs 13mins.
And this is how it looks in my app:
1 Like