title: Error converting string to datetime due to locale
body: <p>I'm having a lot of difficulty with locale's in a particular instance of SQL Server 2008 R2 Express.</p>
  
  <p>I'm in the UK and the following fails:</p>
  
  <pre><code>SELECT CAST('2012-12-31' AS DATETIME)
  </code></pre>
  
  <p>Error message:</p>
  
  <blockquote>
    <p>The conversion of a varchar data type to a datetime data type resulted in an out-of-range value.</p>
  </blockquote>
  
  <p>The Windows server locale is British English.  My login locale is British English.  Collation 'if that matters' is Latin1_General_CI_AS.</p>
  
  <p>The database 'language' is English (United States) but then this is the same as another instance on a different server and the above SQL doesnt fail.</p>
  
  <p>Any thoughts?</p>