How do you convert a string like 2015-10-08 19:56:30.0 to a datetime in SQL Server without having to change languages?
I think this may help you, I have tried this.
Declare @Time as nvarchar(25)
Set @Time = '2015-10-08 19:56:30.0'
Select Cast(@Time As DateTime);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With