This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
Hi, I need the get the currentdate+1 week . So that I can compare with another date which i get from database. Help me out in this. I have Oracle 9i. I need a query compatible to this version.
You could do this easily in Java using the Calendar class. Does it need to be part of the query? Any Oracle solution you come up with is going to be pretty non-portable. [ January 16, 2008: Message edited by: Scott Selikoff ]
Originally posted by Scott Selikoff: You could do this easily in Java using the Calendar class. Does it need to be part of the query? Any Oracle solution you come up with is going to be pretty non-portable.
[ January 16, 2008: Message edited by: Scott Selikoff ]
It's also pretty easy in almost any DBMS... there are differences... but they are all similar.
DB2
select current date + 7 day
Oracle
select sysdate + 7
mysql
SELECT CURDATE() + interval 7 day
or
SELECT DATEADD(currdate()interval 7 day) [ January 16, 2008: Message edited by: Paul Campbell ]