I have this function that works very well to calculate the week of month - i need it to start the week from Monday
CREATE FUNCTION dbo.ufs_FirstofMonth (@theDate
Add the following as the first line in your functions:
SET DATEFIRST 1 -- Set Monday as the first day of the week
Ref. SET DATEFIRST (Transact-SQL) - Sets the first day of the week to a number from 1 through 7. The U.S. English default is 7, Sunday.