Viewing 3 posts - 16 through 18 (of 18 total)
To get the same results,
select @TargetDate = dateadd(dd,@DaysOut,@StartDate)
if datepart(dw,@TargetDate)=@DesiredDayOfWeek set @TargetDate = @TargetDate + 1
while datepart(dw,@TargetDate) <> @DesiredDayOfWeek set @TargetDate = @TargetDate + 1
select @TargetDate
(This was in...
October 13, 2011 at 4:49 pm
How about this:
select @TargetDate=@StartDate+@DaysOut+
case datepart(weekday,DATEADD( d, @DaysOut, @StartDate ))
when 1 then case when @DesiredDayOfWeek>1 then @DesiredDayOfWeek-1 else @DesiredDayOfWeek+6 end
when...
October 13, 2011 at 4:41 pm
I bristle at the notion of the "fair price" of anything. Before I go any further, I'd like to say that I am specifically objecting to the notion of...
January 15, 2010 at 10:34 pm
Viewing 3 posts - 16 through 18 (of 18 total)