Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Elapsed time from GMT

Status
Not open for further replies.

tmcneil

Technical User
Nov 17, 2000
294
US
I have a table containing flight record data that is stored by an autonumber ID. I have Departure times and Arrival times stored as local time. To adjust for the time zone, I have joined the table with the GMT_OFFSET and converted the time values to GMT using a query to send values to a function. The table also has an elapsed time value in minutes, of which, some do not equal the correct value when you subtract the GMT Arrival time from the GMT Departure time.

How do I write vba to subtract GMT ARRIVAL TIME from GMT DEPARTURE TIME, display the returned value in minutes in another field and then verify this value with the ELAPSED TIME from the table?

Thanks,
Todd
 
Todd,

Seems a little weird. The difference will NEVER be the same unless the GMT offsets are the same for arrival & departure.

What are you trying to do?

I think you're trying to get to the elapsed FLIGHT time?

Example:

Depart NY @ 12 Zulu (Local @ NY) w/ GMT + 5
Arrive SF @ 14 Zulu (Local @ SF) w/ GMT + 8

What is the actual time elapsed for the trip (Flight)

5 Hours = (Arrival - Departure) + (GMT Arrival - GMT Departure)

??? Is this what you're attempting?



MichaelRed
redmsp@erols.com

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top