Hello there! I’m currently developing a flight booking application, and things have been going pretty smoothly. However, I’ve recently encountered an obstacle that’s been challenging to overcome. I will try my best to explain the issue as good as possible since I’m really bad with that, please ask questions if it’s not understandable.
On certain occasions, your flight may arrive on the following day. For instance, your departure time is on January 23 at 22:00, and you arrive at your destination on January 24 at 08:30. I would like to add the feature that, as soon when the flight arrives the next day, a text will appear “+1” next to the arrival time.
I tried to use this formula: arrival time - depart time: format as days:ceiling. But then it doesn’t always result in +1 because the depart and arrival times are too close to each other.
I used this formula: arrival time - depart time: format as days:ceiling,
which results in for example 16-03-2023 16:45 - 15-03-2023 22:20 = 0.8 (ceiling makes it 1). For the example, it’s working properly. However sometimes the result is 0.8 but the flight arrives on the same day, so it isn’t functioning properly.
Is there a formula that only calculates the date and not the date & time? So the formula will be 16-03-2023 - 15-03-2023 = 1? And if not, is there another way to fix this?