How to Translate UTC dates to local Dates?

  • Jeff,

    Would not have been able to do this without your kick-start.  This had been puzzling me for quite a while.  Thank you for your original post.

    We have separate databases for each of our locations, so I created table tblRefTimeZone in each of the databases with one record in it.

    For an eastern time zone plant, the Offset integer column is set to -5 and the DST bit is set to 1.  A plant in California would have an offset of -8 and DST of 1.

    Ron

  • Brilliant... I'm impressed.  Thanks for the feedback.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 2 posts - 16 through 16 (of 16 total)

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