July 8, 2024 at 12:00 am
Comments posted to this topic are about the item The First Day of the Week
July 8, 2024 at 12:06 am
Be REALLY careful here folks. The answer and the reason is correct except for one of the most important places in SQL Server and that's for the DATEDIFF() function. The value of DATEFIRST does NOT change the first day of the week for DATEDIFF(week, SomeDateTime). Instead, the first day of the week is always considered to be SUNDAY for DATEDIFF(week).
See the article subsection that speaks about this at the following link...
https://learn.microsoft.com/en-us/sql/t-sql/functions/datediff-transact-sql#remarks
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply