SQL Server not liking dates in YYYY-MM-DD format

Posted by greenfingers on Server Fault See other posts from Server Fault or by greenfingers
Published on 2010-03-25T14:00:05Z Indexed on 2010/03/25 14:03 UTC
Read the original article Hit count: 257

Filed under:
|
|
|

Is there a setting in SQL Server which will persuade it to accept 'yyyy-mm-dd' style dates in a query.

Got queries which are running fine on most of our SQL servers one box running Microsoft SQL Server 2005 Developer doesn't like them. This is the error:

The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.

YYYYMMDD works fine

© Server Fault or respective owner

Related posts about sql

Related posts about locale