Datediff function and the first day of the week - by Pawel Potasinski

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 239958 Comments
Status Closed Workarounds
Type Bug Repros 2
Opened 11/21/2006 12:59:45 PM
Access Restriction Public


It seems that DATEDIFF function always uses Sunday as the first day of the week. Even if you use SET DATEFIRST just before using DATEDIFF.
Sign in to post a comment.
Posted by Microsoft on 10/18/2007 at 7:57 AM

It looks like this was closed without providing any feedback. The rationale for closing this was that changing the behavior to honor DATEFIRST would make it non-deterministic, and this would prevent building indexes on computed columns or views involving it. This behavior has been around for several versions, so this is a breaking change that doesn't seem worth it.