Quantcast
Viewing all articles
Browse latest Browse all 16

Conversion failed when converting date and/or time from character string

when v.value is not null and rtrim(ltrim(v.value)) <> '' and isdate(v.value) = 1, it needs to be convert to datetime, not varchar(20). The data is insert into a table that has datetime data type.

thanks.


The point is you cannot mix data type in your CASE Expression. Your column has only one data type in a normal design.

Viewing all articles
Browse latest Browse all 16

Trending Articles



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