I have a datetime value. That datetime value may be in any timezone like \'Eastern Standard Time\' or \'India Standard Time\'. I want to convert that datetime value to UTC t
for older then sql server 2012 use below query, it worked for me.
DECLARE @localdate DATETIME = '2020-01-10 05:30';
Declare @DateDiff bigint =Datediff(minute, Getdate(),Getutcdate() ) --GetDate -current datetime of local
--Declare @DateDiff bigint =-330 --you ca declare timezone different in minutes also
SELECT @localdate AS LocalDate, Dateadd(minute, @DateDiff, @localdate) AS UTCConvertedDate;