How can I calculate a date after a month of current date.
Example if I have 19/04/2012 I want to get 19/05/2012. Is there any function on sql that allows doing this?
I need to do the same for a year also like 19/04/2012 and set 19/04/2013
Cheers
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use
DATEADD (datepart , number , date )
as specified here
Examples (thanks to DarrenDavis)
for month:
for year: