Open andrewgregory opened 6 years ago
It uses DATEPART with ISO_WEEK which returns the week number, not the day of the week. See https://docs.microsoft.com/en-us/sql/t-sql/functions/datepart-transact-sql?view=sql-server-2017#isoweek-datepart
It uses DATEPART with ISO_WEEK which returns the week number, not the day of the week. See https://docs.microsoft.com/en-us/sql/t-sql/functions/datepart-transact-sql?view=sql-server-2017#isoweek-datepart