2 Replies Latest reply on Oct 1, 2014 3:00 AM by ErlendurGudmundsson

# Another Time Calculation Question

### Title

Another Time Calculation Question

### Post

I am developing a maintenance logbook in FM12 and I have to calculate elapsed time that sometimes goes from one day to the next. I have looked at some of the solution on the forum but can't seem to get it right. This is what I need.

The aircraft takes off on 23 september at 22:12 and lands on 24 september at 03:43  I need to calculate the total flight time and display it in hours and minutes (decimal minutes, mind you ;) ) So it would look something like this:

TO Time: 22:12 LND Time: 03:43 FLT Time: 5.5 ( 5 hours and 31 minutes Rounded to the nearest decimal) I have been using the following formula Round((Landing Time - TakeOff Time)/3600;1) which works fine if I don't pass midnight. The Landing Time and TakeOff Time fields are Time fields and the Flight Time field is a Number field.

Any suggestions much appreciated.

Regards.

Erlendur

• ###### 1. Re: Another Time Calculation Question

Try:

Let([
TO = TakeOff Time ;
LND = Landing Time ;
LNDadj = If ( LND ≤  TO ; LND + 24 * 3600 ; LND )
];
Case(
TO * LND ; Round ( ( LNDadj - TO ) / 3600 ; 1 )
)
)

• ###### 2. Re: Another Time Calculation Question

Wow, Thanks. Worked like a charm. I owe you big time

Erlendur