There would be situations where in an application would have developed ages ago not considering to support multi time zone but later you realise and want to handle the same, when the application is already on production for couple of months or years. Recently I had to do a migration, where I had to update existing datetime field’s data and format it into UTC (Coordinated Universal Time) to neutralise the time zone.
So far there is no direct functions or format available in SQL Server to format an existing date into UTC. I had to tweak and play around with few inbuilt date functions to achieve the same.
DECLARE @dt DATETIME = '2016-06-20 22:23:13.920' SELECT DATEADD(MI,(DATEDIFF(MI, SYSDATETIME(),SYSUTCDATETIME())), @dt)