You’ll need to specify the value in an accepted format.
<pre>select cast (’19461129′ as datetime)</pre>
The default cutoff year for two-digit years is 2049 (i.e. Sql Server interprets two-digit years as being between 1950 and 2049).
I don’t know if there is some other way to get the results you need, but you may need to change this option in the database. (for compatibility, it is not recommended to modify it)
Have a look at the following page for instructions on how to do it in Sql Server 2000:
<a href=”http://msdn.microsoft.com/en-us/library/aa177108(SQL.80).aspx”>How to set the two digit year cutoff option (Enterprise Manager)</a>
Changing the defaults on your database is a bit risky, as it will affect how other applications behave. A better approach (if you have to deal with 6-digit date strings) is to write a function to apply some rational processing to the string before converting it. Most applications that accept 2-digit years apply a +25/-75 rule – if adding the current century yields a date that is less than 25 years in the future, use that da