Quantcast
Channel: Conversion failed when converting date and/or time from character string
Viewing all articles
Browse latest Browse all 16

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

$
0
0

Use try_cast:

... then try_cast(v.value as datetime)
else  try_cast(v.value as datetime)
end

Just don't mess a datetime value as a string in the first place if you can. Any invalid datetime string will become null.


Viewing all articles
Browse latest Browse all 16

Trending Articles



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