Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2007
    Location
    010101010110100
    Posts
    803

    Unanswered: Calculating the difference in timestamps

    Hi everyone,

    I have a situation that requires me to calculate two fields that both have timestamps in this form "2007-09-27 18:23:03".

    Maybe there is a better way to do this, but I thought I would find the difference between the two timestamp fields to come up with a difference in minutes and then average them.

    Can someone please help by maybe providing an example or by pointing me in the right direction?
    Last edited by Frunkie; 09-23-07 at 06:12.

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    George
    Home | Blog

  3. #3
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by georgev
    When in doubt "RTFM"

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

  4. #4
    Join Date
    Mar 2007
    Location
    010101010110100
    Posts
    803
    Thanks guys! That was what I needed.

Posting Permissions

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