How to convert WindowStart from UTC to local timezone? RRS feed

  • Question

  • Is there any updated guidance on converting WindowStart/WindowEnd to the timezone of the source system? The latest I could find was an incomplete solution using Time.AddHours(). 

    e.g. For convert from UTC to EST.
    ModifiedDate >= \\'{0:yyyy-MM-dd HH:mm}\\' AND ModifiedDate < \\'{1:yyyy-MM-dd HH:mm}\\'', Time.AddHours(WindowStart, -5), Time.AddHours(WindowEnd, -5))
    This solution works until Daylight Savings Time kicks in. Obviously I could convert the modified dates coming from the source system, but with SQL Server that solution is just as fragile.
    Tuesday, February 28, 2017 2:23 PM

All replies

  • Hello,

    try to use this examples,



    • Proposed as answer by Discovety75_ Monday, July 17, 2017 3:04 PM
    Thursday, March 16, 2017 1:00 PM