Daylight Savings Time / Time zones

  • How do I determine what time zone I am in using TSQL?

    CDT, CST, PDT, PST, etc...

  • It appears that all the date functions are referencing what the server setting is for Time Zone.

    Hope this helps.

    David

    David

    @SQLTentmaker

    “He is no fool who gives what he cannot keep to gain that which he cannot lose” - Jim Elliot

  • David, I guess I don't follow what you are stating. When I look at the date and time functions in TSQL it doesn't appear that they have any reference to Time Zones. Could you please elaborate?

    Thanks

  • David, I guess I don't follow what you are stating. When I look at the date and time functions in TSQL it doesn't appear that they have any reference to Time Zones. Could you please elaborate?

    Thanks

  • Sorry, didn't read fully. You will first need to know the difference between your time and Greenwich Mean Time. EST is -5. Once you have that you can compare using the following;

    select datediff(hour, getutcdate(), getdate())

    Hope this helps get you closer and sorry I wasn't more specific in the last post.

    David

    David

    @SQLTentmaker

    “He is no fool who gives what he cannot keep to gain that which he cannot lose” - Jim Elliot

Viewing 5 posts - 1 through 4 (of 4 total)

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