Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GMT to EST Time zone conversion SSIS/SQL Server

Do we have any method in SSIS or SQL Server 2016 by which I can convert GMT to EST time zone.

Case is as follow.

I have a database having datetime column [EventDateTime] which is in GMT Time zone.

What I am doing here is, using SSIS and loading this data into SQL server. Is there a way I can convert GMT timezone to EST timezone while doing SSIS

OR

If there is a way if I can convert GMT to EST after loading into SQL Server.

Note: Please consider Day Light Saving time as well. Day Light Saving Condition: Between Second Sunday of March @ 7:00AM GMT to First Sunday of November @6:00AM GMT time difference is 4Hrs else its 5Hrs


Thanks in Advance.

like image 280
Abdulquadir Shaikh Avatar asked Oct 17 '22 16:10

Abdulquadir Shaikh


1 Answers

I think the following link addresses your question and takes into account Day Light Savings Time. It provides a workaround to this limitation in SQL Server.

Date time conversion from timezone to timezone in sql server

You could apply this approach in an Execute SQL Task and return the result to a variable for use in other control/data flow tasks.

Hope this helps.

like image 130
user3662215 Avatar answered Oct 21 '22 02:10

user3662215