Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2006
    Posts
    66

    Unanswered: check time difference

    i have a field called datemodified

    How can I run a select statement to check if 5 minutes have passed from the datemodified or not?

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    WHERE datemodified < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 5 MINUTE)
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    [strikeout]Look up date_diff in the manual[/strikeout]

    EDIT: or not
    George
    Home | Blog

Posting Permissions

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