It is not unreasonable to expect that datediff(week, date1, date2) would respect the setting of SET DATEFIRST. However this is not the case, because that would make the function nondeterministic as discussed in the response to itemhttps://connect.microsoft.com/SQLServer/feedback/details/239958/datediff-function-and-the-first-day-of-the-week#detailsThere is no reason to change this, but since users may expect a different behaviour, there is all reason to explicitly point out in the topics for datediff() and SET DATEFIRST that the DATEFIRST setting is not applicable to datediff.
Product Language
Version
Category
Operating System
Operating System Language
Steps to Reproduce
Actual Results
Expected Results
Platform
Virtualization