RE: Incorrect DOTW on SQL Server 8.0
Don't think that "DATEFIRST" should matter in this case. As the @@DATEFIRST value is changed, only the weekday numbers are changed as well. It doesn’t affect the number to name mapping. SET DATEFIRST 7 -- default, SundaySELECT DATEPART(WEEKDAY, getdate()),DATENAME(WEEKDAY, getdate())The result will be 4, Wednesday SET DATEFIRST 1 -- MondaySELECT DATEPART(WEEKDAY, getdate()),DATENAME(WEEKDAY, getdate())The result will be […]
2004-06-02