• Thankx for the information.I didn't notice this

    quote:


    Dinesh, please note that GMT and UTC is not exactly the same thing. As I discussed in my article SQL and Java go on a Date (http://www.sqlservercentral.com/columnists/chedgate/sqlandjavagoonadate.asp), UTC adds a "leap second" every year or two. Therefore it is not possible to retrieve the utc-time for a specific datetime using code like this:

    
    
    DATEADD ( hh , (DATEDIFF ( hh , GetDate(), GetUTCDate() )) , @dt_Date_Time )

    The reason is that the difference between getdate and getutcdate will be different depending on when you run it. Of course, if you want the difference in hours (as in your example) you might not notice it because it is only a second every year or two, but there will be a difference. And if you want the difference in milliseconds you would definately note this.

    --

    Chris Hedgate @ Extralives (http://www.extralives.com/)

    Contributor to Best of SQL Server Central 2002 (http://www.sqlservercentral.com/bestof/)

    Articles: http://www.sqlservercentral.com/columnists/chedgate/





    My Blog: http://dineshasanka.spaces.live.com/