Adjust server time for GMT

  • SELECT getdate()

    This is server time .

    Returns DATETIME format : 2009-11-02 11:16:59.890

    I need a function that can turn this time/date into GMT +13, hows that done??

    SQL 2005 (sp2 i think)

  • SELECT DATEADD(hh, 13, getdate())

    ---------------------------------------------------------------------

  • From Books On Line

    ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/tsqlref9/html/48a5b230-102e-4a89-bb2a-fcf0cac862bb.htm

    GETUTCTIME is a function in SQL 2005 check out the above link

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • This 2005 function "GETUTCTIME"

    This works off server time, to give current GMT.

    So when server time is adjusted for day light saving I will still get GMT from this GETUTCTIME???

    Just checking that its rock solid !!:-)

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

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