none
How to calculate local time based on GMT? RRS feed

  • Question

  • Hello Experts,

    I am trying to figure out the local time for various countries based on the GMT time data I have for them. I would also need to know if any of them observe Daylight Savings Time as well. Is there a way to achieve this without CLRs? Here is some sample data for your reference.

    DDL:

    CREATE TABLE #Temp(
    COUNTRY_CODE VARCHAR(2)
    DATETIME VARCHAR(50)
    )
    


    DML:

    INSERT INTO #Temp(COUNTRY_CODE, DATETIME)
    VALUES
    ('EE', 'Sun Mar 29 00:00:00 GMT 1992'),
    ('AZ', 'Sun Mar 28 00:00:00 GMT 1993'),
    ('CZ', 'Sun Mar 27 00:00:00 GMT 1994'),
    ('DE', 'Sun Mar 26 00:00:00 GMT 1995'),
    ('AD', 'Sun Mar 31 00:00:00 GMT 1996'),
    ('GI', 'Sun Mar 30 00:00:00 GMT 1997'),
    ('DK', 'Sun Mar 29 00:00:00 GMT 1998'),
    ('AL', 'Sun Mar 28 00:00:00 GMT 1999'),
    ('ES', 'Sun Mar 26 00:00:00 GMT 2000'),
    ('LT', 'Sun Mar 25 00:00:00 GMT 2001')
    

    Environment:

    Microsoft Azure SQL Data Warehouse - 10.0.10783.0 Oct 26 2019 23:24:02 Copyright (c) Microsoft Corporation

    Thanks!


    Known is a DROP, Unknown is an OCEAN.

    Friday, December 6, 2019 2:44 PM

All replies