Copy link to clipboard
Copied
Hello. I'm hoping someone can help me out. I am trying to make a pdf document which will calculate flight time by entering in departure and arrival times. The times will be entered in military time format. The times may also cross over midnight ( take off at 2300 and land at 0100). Finally we need the output to be calculate in decimals to a tenth of a minute (01-06 is a .1, 07-12 a .2 etc).
E.g.- Takeoff at 2235 and land at 0115. Flight time should equal 2.7
Copy link to clipboard
Copied
Can the total time exceed 24 hours?
Copy link to clipboard
Copied
No it will not. It will most likely be between 0.2-10.0 hours in the result.
Copy link to clipboard
Copied
Doing it will require a custom-made script. There are multiple code samples posted to the forums that do something similar, but rounding it to a single digit is a bit tricky. If you're interested I could write it for you, for a small fee. You can contact me privately via [try6767 at gmail.com] to discuss it further.
Alternatively, you can start with these tutorials on how to work with Date and Time in Acrobat Javascript:
https://acrobatusers.com/tutorials/working-with-date-and-time-in-acrobat-javascript
https://acrobatusers.com/tutorials/working-with-date-and-time-in-acrobat-javascript-part-2
https://acrobatusers.com/tutorials/working-date-and-time-acrobat-javascript-part-3-3