SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: Comparing Dates

  1. #1
    SitePoint Enthusiast
    Join Date
    Oct 2004
    Location
    Wales
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Comparing Dates

    Hi I have a mysql table with a datetime column and was woundering how can I query the database to return the records where the date was three days ago?

  2. #2
    SitePoint Enthusiast
    Join Date
    Mar 2004
    Location
    Ukraine, Khmelnitsky
    Posts
    55
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use MySQL-function DATE_ADD or DATE_SUB.
    Sergey Bres aka tserbis, Ukraine

  3. #3
    SitePoint Enthusiast
    Join Date
    Mar 2004
    Location
    Ukraine, Khmelnitsky
    Posts
    55
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ... or just INTERVAL.
    Sergey Bres aka tserbis, Ukraine

  4. #4
    SitePoint Enthusiast
    Join Date
    Oct 2004
    Location
    Wales
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That works thanks


Bookmarks

Posting Permissions

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