I have a SQL table with datetime2 objects, and they are stored in UTC TIME
for example
UTC_TIME = 2017-10-20T13:16:14.6950000
I have successfully converted this timestamp to local time using
SELECT UTC_TIME AT TIME ZONE 'W. Europe Standard Time' AS LOCAL_TIME
The output of the above is
2017-10-20T13:16:14.6950000+02:00
This is correct, but the output I want is
2017-10-20T15:16:14.6950000
The offset should be added to my timestamp.
Is there an easy way to do this ?
Example : An event was logged on UTC time 2017-10-20T13:16:14.6950000 I'm in Western Europe, and for the moment there is an offset of 2 hours. So the actual local time is 2017-10-20T15:16:14.6950000
I would like to convert the UTC time (13:16), so that the result is 15:16
The query is executed on a server that runs in UTC timezone.