简体   繁体   中英

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM