Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2007
    Posts
    64

    Thumbs down Unanswered: MySQL data substraction

    Is it possible to substract the entire date parameters(year,month,date) by using a single or two functions .

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    yes, it is

    if you would give a more realistic example, i can give a more realistic answer
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Aug 2007
    Posts
    64
    Suppose i have two date columns say 'DATE1' and 'DATE2' which has values "2008-09-15" and "2007-07-11" .

    now i want the diff of these two columns in date format, i mean the diff should return a date value.

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    oh really? and what is the "date value" that you would like to see from this particular calculation?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  5. #5
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Find the difference in days, and then add this on to the base date (equivalent to 0)?
    George
    Home | Blog

  6. #6
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    The manual should be your friend
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

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