SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 add one day to the current date
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

luarit
Starting Member

6 Posts

Posted - 05/24/2012 :  06:07:37  Show Profile  Reply with Quote
Hi all,

A stupid question...

How can I add one day to the current date in a select. I want something similar to add one month to current date, but with days:

something like:

select TO_CHAR (ADD_MONTHS (SYSDATE, -1), 'DD-MM-YYYY')
from dual

webfred
Flowing Fount of Yak Knowledge

Germany
8513 Posts

Posted - 05/24/2012 :  06:13:17  Show Profile  Visit webfred's Homepage  Reply with Quote
looks like oracle but these forums are about MS SQL Server.

You can try dbforums.com/oracle


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

madhivanan
Premature Yak Congratulator

India
22460 Posts

Posted - 05/30/2012 :  03:56:17  Show Profile  Send madhivanan a Yahoo! Message  Reply with Quote
select TO_CHAR (SYSDATE+1, 'DD-MM-YYYY')

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000