Converting GMT to EST

  • I need to write a function that converts a time from GMT to EST taking daylight savings time into consideration.

    On a high level I was thinking of doing the following:

    a) a table that holds the daylight saving dates for this year and upcoming years. does anyone know a website that has these dates published?

    b) if the date passed to the function is greater or equal to the date for the fall daylight saving date (i.e., 11/2013) but less than the spring daylight saving date (i.e., 3/2014) then subtract 6 from the gmt to get est

    c) if the date passed to the function is greater or equal to the date for the fall daylight saving date (i.e., 3/2014) but less than the spring daylight saving date (i.e., 11/2014) then subtract 5 from the gmt to get est

  • Eastern Daylight Time (EDT) is UTC (GMT) -4 hours

    Eastern Standard Time (EST) is UTC (GMT) -5 hours

    You should be able to find all the information you need here:

    Daylight Saving Time – DST

    http://www.timeanddate.com/time/dst/

  • Use GETUTCDATE() which is available in SQL Serevr , it will convert your timezone into GMT .

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply