Viewing 3 posts - 1 through 3 (of 3 total)
Thanks for the article, makes me look forward to our upcoming migration from 2000 to 2008.
However, I have to ask why you would actually try to use recursion for the...
August 27, 2009 at 7:24 am
Thanks for the catch on the negative numbers. I've added a 14 day offset to ensure the code always lands in the current month. Works for every day...
August 13, 2009 at 6:12 am
declare @DayToFind tinyint, @AnyDayInAMonth datetime
select @DayToFind = 1, --Monday
@AnyDayInAMonth = '2009-04-15'--Target month
select dateadd(day, (datepart(d, @AnyDayInAMonth) - datepart(dw, @AnyDayInAMonth) - @@datefirst + @DayToFind) % 7, dateadd(day, 1-datepart(d, @AnyDayInAMonth), @AnyDayInAMonth))
Seems like a...
August 12, 2009 at 2:15 pm
Viewing 3 posts - 1 through 3 (of 3 total)