The date format used in Example B ("EOMONTH with string parameter and implicit string conversion" is ambiguous, and the result of running that code depends on locale or SET LANGUAGE setting. WHen running on, for instance, a French installation of SQL Server (or when forcing that behaviour by running "SET LANGUAGE French;" first), it will be interpreted as d/m/y, and the output will be 2011-01-31.For "safe" implicit conversion from string to date or datetime, always use a "safe" format: "yyyymmdd
↧