June 29, 2012 at 9:28 am
Hi,
I have a part of my query that works fine for the current month.
Thing I can'figure out is how to add 90 days to it.
Here's what I have:
dateadd(month, datediff(month,'19000101',CURRENT_TIMESTAMP),'19000101')
I need this to look into the future 90 days.
June 29, 2012 at 9:30 am
You just want to add 90 days to what that returns?
dateadd(day, 90, dateadd(month, datediff(month,'19000101',CURRENT_TIMESTAMP),'19000101'))
June 29, 2012 at 9:32 am
I think I want to do this..
SELECT dateadd(month, datediff(month,'19000101',getdate()+ 90),'19000101')
testing now
June 29, 2012 at 9:37 am
New_at_this (6/29/2012)
I think I want to do this..
SELECT dateadd(month, datediff(month,'19000101',getdate()+ 90),'19000101')
testing now
So this then?
dateadd(month, datediff(month,'19000101',dateadd(day, 90, CURRENT_TIMESTAMP)),'19000101')
June 29, 2012 at 9:55 am
New_at_this (6/29/2012)
I think I want to do this..
SELECT dateadd(month, datediff(month,'19000101',getdate()+ 90),'19000101')
testing now
Don't tell us what you think you want, tell us what you do want.
It would help if you would explain what it is you are trying to accomplish. There is more that you can do as well. Since you are new here, please take the time to read the first article I link to in my signature block below. It offers excellent guidance on what to post and how to post it to get the best answers to your questions.
June 29, 2012 at 10:21 am
okay thank you.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply