Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2010
    Posts
    39

    Unanswered: how do i find the last date from today in mysql

    how do i find the last date from today + 10 days skip weekend .

    i did

    SELECT (
    DATE_ADD( NOW( ) , INTERVAL 10 DAY ))

    not sure how to subtract weekends now

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    have a look at the mysql datetime functions
    MySQL :: MySQL 5.5 Reference Manual :: 11.7 Date and Time Functions
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by healdem View Post
    where in there does it say how to skip weekends?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    it doesn't, but it does have a function that will identify the day, and from that should be able to work out weekends
    I'd rather be riding on the Tiger 800 or the Norton

Tags for this Thread

Posting Permissions

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