Answers for "Msg 241, Level 16, State 1, Line 12 Conversion failed when converting date and/or time from character string."

SQL
0

Msg 241, Level 16, State 1, Line 12 Conversion failed when converting date and/or time from character string.

DECLARE @Value nVarchar(MAX)='2016-03-01 00:00:00.000000'
SELECT CONVERT(DATETIME,LEFT(@Value,23),101)
Posted by: Guest on November-11-2020

Code answers related to "Msg 241, Level 16, State 1, Line 12 Conversion failed when converting date and/or time from character string."

Code answers related to "SQL"

Browse Popular Code Answers by Language