var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: subtract a year from current date
Hey all, how do you take the current date and subtract a year from it in a SP?
What I want to do is...
Take the current date when the SP is ran, subtract a year, then if my date field is within that range (higher than the date with the subtracted year) it will continue in the query.
Edit: the answer is..
dateadd(yyyy, -1, getdate()) as Date1
Last edited by hueby; 01-12-05 at 12:12.
Which DBMS are you using?
Tony, he found the answer by himself (see the "Edit" note at the bottom of his post).
Hm, perhaps you saw it but only wanted to find out which DBMS it was?
You should have posted this in that forum then. I'll move it.
No, I just didn't read it carefully enough!
Originally Posted by Littlefoot
Oh, sorry.. I thought this was in the MS SQL Server forum.. my mistake.