Guides

Convert Datetimeoffset to DateTime in SQL Server

Datetimeoffset to DateTime Convert issue in SQL Server 2016 Database. You are facing issue in one conversion, which is working fine in 2008 DB but not in 2016 DB. Select Convert(DateTime,created_ts,20) From Table Where, created_ts Type is DateTimeOffset. Its throwing error in 2016, as “The style 20 is not supported for conversions from datetimeoffset to datetime.” Please see …

Convert Datetimeoffset to DateTime in SQL Server Read More »