Results 1 to 2 of 2

Thread: sum field Time

  1. #1
    Join Date
    Apr 2011
    Posts
    1

    Unanswered: sum field Time

    Hello all
    help me, I'm just learning mysql, I have tabel1 with field Time (10:12:09) how to query enumerates all fields Time in Table1?

    example:
    record1 00:10:12
    record2 00:12:10

    Total 00:22:22

    thank you

    greeting

    Trisis

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    use TIME_TO_SEC to convert to integer seconds, apply SUM, then apply SEC_TO_TIME to convert to time format

    and next time, please post mysql questions in the mysql forum

    ta

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

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