FlightInfoEx Todays Flight Only


#1

Hi,

How could I get the FlightInfoEx for todays flight only if I don’t have the the departure time? For instance I only had the idet (AAL1)?


#2

You could iterate through each of the results returned by FlightInfoEx to see which one matches your definition of “today” (which becomes complicated with timezones).


#3

Basically I am trying to get the most recent (either the most recent that is in flight or about to take off or just landed). The problem I hav is flight flights like AA104 it is two segments the DCA-JFK in a 738 and then JFK-LHR in a 772 I am trying to only get the JFK-LHR segment and also it keeps returning the one for 2 days ahead if I set “howmany” to 1


#4

I’d recommend leaving howmany at the default 15 and picking the result you want from the set returned.


#5

Yes you’ll have to request more than just 1 and look through for the first result with actualdeparturetime != 0


#6

Not always, since he sometimes wants the flight “about to take off”.