Forum Replies Created

Viewing 3 posts - 16 through 18 (of 18 total)

  • RE: Need the First Tuesday Beyond Y days after X Date

    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...

  • RE: Need the First Tuesday Beyond Y days after X Date

    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...

  • RE: The Price of SQL Server

    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...

Viewing 3 posts - 16 through 18 (of 18 total)