• Hi,

    Just sorted out after some hindrance that the parentheses are not in the right order for the supplied script (last line). Below is the changed script. Cheers.

    DECLARE @StartDate date

    DECLARE @DaysOut tinyint

    DECLARE @DesiredDayOfWeek tinyint

    SET @StartDate = '20110813' --The starting date

    SET @DaysOut = 4 --Number of days to count out (the Desired day is AFTER this count)

    SET @DesiredDayOfWeek = 6 --The desired day of week

    SELECT DATEADD( d,( @DaysOut +( 7 - ( ( 7 + DATEPART( weekday, DATEADD( d, @DaysOut, @StartDate )) - @DesiredDayOfWeek ) % 7) )), @StartDate )