Quantcast
Channel: Answers for "Conversion failed when converting date and/or time from character string."
Browsing all 4 articles
Browse latest View live

Answer by Kev Riley

`IsDate` will return 1 if the expression can be converted, and 0 if not - don't test for `null`

View Article



Answer by Fatherjack

so, expanding on Kevs answer, you need to adjust your code a little. This should be close to whats required: CASE WHEN IsDate(r.ReferralDonorDeathDate) = 1 THEN Convert (DateTime,(Convert(VarChar (20),...

View Article

Answer by Kev Riley

`IsDate` will return 1 if the expression can be converted, and 0 if not - don't test for `null`

View Article

Answer by Fatherjack

so, expanding on Kevs answer, you need to adjust your code a little. This should be close to whats required: CASE WHEN IsDate(r.ReferralDonorDeathDate) = 1 THEN Convert (DateTime,(Convert(VarChar (20),...

View Article
Browsing all 4 articles
Browse latest View live




Latest Images