Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2005
    Posts
    4

    Unanswered: DATE: Add Day ??

    Hello everybody!
    First, I'm French (sorry for my english ^^).

    I'm a newbie on IBM DB2.
    I'd like to know if there is a function to add day on a date.
    For exemple (DateADD --> MS SQL Server)
    to do something like that:

    SELECT .... FROM ... WHERE WEEK(DateDebut + 1day) BETWEEN .. AND ..

    Thank you

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Quote Originally Posted by MadCat34
    to do something like that:

    SELECT .... FROM ... WHERE WEEK(DateDebut + 1day) BETWEEN .. AND ..
    You got it almost right (provided that DateDebut is of the DATE type):
    Code:
    SELECT .... FROM ... WHERE WEEK(DateDebut + 1 day) BETWEEN .. AND ..

  3. #3
    Join Date
    Dec 2005
    Posts
    4
    Well , DateDebut is like that: '2005-10-01 12:00:25.000000'
    So, yes, i think it's Date Type

    PS: Thanks! It's working ^^
    I thought there was a function do add...and i didn't know the "Date + x day"
    Last edited by MadCat34; 12-05-05 at 10:40.

Posting Permissions

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