Daylight savings time

  • Is there any way to find if we are in daylight savings time or not using T-SQL.

    I was thinking of the following but not sure if it would work or not without actually changing the clock. Comments?

    select datediff(hh, getdate(),getutcdate())

    if result is 4 then in Daylight and if 5 then no. (server is located in east coast)

    Thanks

     

     

  • check the below link ,i got something about daylight saving!!

    http://www.msusenet.com/archive/index.php/t-1964387.html

     

    Hope this will help you


    Kindest Regards,

    Pavas

    Dream The Dream
    Explore the World
    Experince The Exhilaration

  • Thanks. Reading information in the link, it looks like Jason has the same idea but he also has the same question - would the method work or not. Would really appreciate if someone could clarify if taking the difference between utcdate and getdate would work or not.

    Thanks

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

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