Results 1 to 3 of 3
  1. #1
    matthewjones108 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2012
    Posts
    3

    Different between two times......

    Hi all!



    I am creating a database for a project based on an airline, and have Take off time, and Landing Time. I have used

    DateDiff("n",[Landing Time],[Take off time])

    But I cant seem to get it to put in the format of a time, and some of the times will go into minus if the flight goes to a different time zone in the world. Any help appreciated!

    Matthew

  2. #2
    R_Badger is offline Knows a few tricks
    Windows XP Access 2003
    Join Date
    Feb 2012
    Location
    Suffolk, UK
    Posts
    262
    I am going to assume you want the time for flight duration (you never specified exactly what you wanted to get).

    First thing you need to do is identify the timezone (kind of like doing fractions you can't do the maths without first getting a common denominator). I suggest using the military convention as shown here:

    http://www.timeanddate.com/library/abbreviations/timezones/military/a.html


    This means the table needs two new fields ([Landing_TZ],[Take_off_TZ])

    So now you can convert your times to the same time. I suggest using GMT as it is the international standard even if people do call it by different names.

    you can then use FORMAT see:

    http://msdn.microsoft.com/en-us/library/aa195902%28v=office.11%29.aspx

    and here for more on date/time specifics
    http://msdn.microsoft.com/en-us/libr...ice.11%29.aspx

    This would probably be best run in VB to calculate this by the way.

  3. #3
    matthewjones108 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2012
    Posts
    3
    Yes, the flight time is what I wanted! Thank you!

    So, need to make the new fields, and then put the calculation in e.e. 14.45+4 (4 being the + time zone) ?

    Thanks

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Filter between times
    By bigderon88 in forum Queries
    Replies: 1
    Last Post: 03-30-2012, 02:42 PM
  2. Data not matching with times
    By dumbee188 in forum Access
    Replies: 0
    Last Post: 07-08-2010, 01:54 PM
  3. Report duplicating itself many many times
    By TrudyD1474 in forum Reports
    Replies: 1
    Last Post: 06-24-2010, 11:59 AM
  4. Query: How many times does a value exist?
    By hognabbt in forum Queries
    Replies: 1
    Last Post: 01-10-2010, 01:33 PM
  5. Top 3 times for each distance
    By CraigBFG in forum Queries
    Replies: 0
    Last Post: 06-24-2009, 09:19 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums