I have below string of date time
2017-09-06 00:36:32.473491+05:30
I want to store this date time into MS SQL Server table and my datatype for this column is datetime.
I tried CAST but it gives me the following error
Conversion failed when converting date and/or time from character string.
So please help me to fix this.
I am using MS SQL Server 2014
DateTime.Parse("2017-09-06 00:36:32.473491+05:30")works as it is.select CAST('2017-09-06 00:36:32.473491+05:30' AS DateTime) as date_time;in MS SQL Server itself.