TimeZoneInfo Conversion Most Urgent

  • Hi,

    I have a situation where I need to calculate some of the Time Differences based on the Timezoneinfo in the registry

    I tried using the following after browsing few sites, however the return value is not in readable format and may not be of any help for me

    DECLARE @v-2 varbinary(4000)

    EXEC master.dbo.xp_regread N'HKEY_LOCAL_MACHINE',

            N'SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Pacific Standard Time',

     N'TZI' , @v-2 OUT , N'no_output'

    SELECT @v-2

    It returns 0xE001

    Any help on this would be highly helpful.

     

    Thanks

    -Prasad

    Prasad Bhogadi
    www.inforaise.com

  • maybe you'll find your answer overhere : http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=127910

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

  • Hi, Thanks alot for the link, its very informative, however I have a little different issue infront of me, basically I want to read all the Time Zones and their respective bias information along with Daylight startday and enddays along with the offset of each one of them from either a UDF or a Stored Procedure, This requirement is because I am not sure from where the application is called , I mean the user will have an ability to invoke this function from different time zones and based on time zone selected I should be able to convert the date to the local time by calculating the offsets.

     

    Thanks

    -Prasad

    Prasad Bhogadi
    www.inforaise.com

Viewing 3 posts - 1 through 2 (of 2 total)

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