SELECT (DAY(@dt) + (((8 - (1 + ((7 - ( DATEPART(dw, DATEADD (month, DATEDIFF (month, 0, @dt), 0))-1) -- DOW of the first of month ) % 7) -- day of the first Sunday in the month ) ))%7) -- # of days to add to make the first week full 7 days -1)/7 + 1>I'm trying to determine what week# a given date falls in based off the date. Some months have 4 weeks and some have 5. In this example, the month of June has 5 weeks, but only the 1st and 2nd of June are in the first week, the rest are left over days from May.