I have a datetime data from C# like this
2019-03-20T11:25:32.0342949
I tried to convert it to datetime using cast and it triggers error
select cast('2019-03-20T11:25:32.0342949' as date)
Conversion failed when converting date and/or time from character string.
I guess its because of the T
in the string.
I tried format also which of course doesn't work because its not identify it as date.
So how can I convert it properly to date. Without some substring methods to extract the date part.