Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

How to solve this error : The conversion of a nvarchar data type to a datetime data type resulted in an out-of-range value.

$
0
0

Hi,

I have 13 million records in the table with nvarchar(254) column ( DocDate)  with values like '2010-02-19'.

I have created another column (DocDate1 - datetime data type) and updating with DocDate values.

Having wrong format in the DocDate that cannot be converted to date in to DocDate1.

I am getting an error "The conversion of a nvarchar data type to a datetime data type resulted in an out-of-range value."

Please help me to get wrong format dates from DocDate and update remain .

Thank you.



Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>