If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > DATE: Add Day ??

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-05-05, 09:28
MadCat34 MadCat34 is offline
Registered User
 
Join Date: Dec 2005
Posts: 4
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
Reply With Quote
  #2 (permalink)  
Old 12-05-05, 09:33
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
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 ..
Reply With Quote
  #3 (permalink)  
Old 12-05-05, 09:35
MadCat34 MadCat34 is offline
Registered User
 
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 09:40.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On