• Hi Trigger,

    The @numDays parameter is the number of business days to move forward in time.

    To get 2006-12-27, you should have used:

    SET @Date = dbo.fnGetNextBusinessDay ('2006-12-24', 1)

    to get the "first" next business day. Your use of:

    SET @Date = dbo.fnGetNextBusinessDay ('2006-12-24', 10)

    should get the 10th next business day.


    Hugo Kornelis, SQL Server/Data Platform MVP (2006-2016)
    Visit my SQL Server blog: https://sqlserverfast.com/blog/
    SQL Server Execution Plan Reference: https://sqlserverfast.com/epr/