Getting the sum of times (eg 09:23) in a database

Results 1 to 2 of 2

Thread: Getting the sum of times (eg 09:23) in a database

  1. #1
    Join Date
    Dec 1969

    Default Getting the sum of times (eg 09:23) in a database

    I want to make a database/asp page to keep track of my logged pilot flying time.<BR>I made a datbase with the same fields as the logbook (Jeppesen) and started adding flights, then i wanted to count my total flown hours and minutes, so i set up a query with the following command(sql) SELECT SUM(TOTAL_DURATION)....<BR>The TOTAL_DURATION field is a date and time set as short time (access 2000)<BR><BR>But it just gave me like a 10e189w281 answer, why?<BR><BR>Is there a way to get this to work or am i at the wrong track?<BR>Any other tips??<BR><BR>Thanks!

  2. #2
    Join Date
    Dec 1969

    Default Sort of

    You should not store the values as dates. Adding dates does not make sense. What you need is an interval hour to minute datatype but as this is not supported by access you have to store it as a numeric value. I.e. you convert your hour to minute value to minutes and store that value. Then you can use sum on that column and convert it back to hour to minute when displayed.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts