Is it possible to convert CST to UTC in MSSQL?
For example:
convert Thu May 13 11:14:19 CST 2021
to 2021-05-13 11:14:19.000
Is it possible to convert CST to UTC in MSSQL?
For example:
convert Thu May 13 11:14:19 CST 2021
to 2021-05-13 11:14:19.000
As I mentioned in the comment, assuming your value is a datetimeoffset
(and why wouldn't it be, it's a date and time value with a time zone), you can use AT TIME ZONE
to change the time zone of a value. With a single value, this would like this:
DECLARE @YourDate datetimeoffset(0) = '2021-05-13T11:14:19-08:00';
SELECT @YourDate AT TIME ZONE 'UTC';
On the fly conversion: