Converting a server datetime to the mentioned timezone
-
יום רביעי 23 פברואר 2011 10:34
I am facing an issue with the conversion of the timezone to a target timezone. Below is the detail of my question
I have two inputs
1) Current timestamp (Server)
2) Target Timezone (values will be like 'Europe/London' or 'Asia/Chennai' etc..
So assume the input values are '23-FEB-11 10.33.24' and 'Asia/Chennai'
I should get the output as '23-FEB-11 16.03.24'
Please help me by providing a code in SQL Server 2008
- הועבר על-ידי Sethu SrinivasanMicrosoft Employee יום שלישי 14 אוגוסט 2012 21:41 TSQL (From:SQL Server Application and Multi-Server Management)
כל התגובות
-
יום שישי 26 אוגוסט 2011 10:30
Your problem statement is not very clear. What's the pupose for such conversion? Are you writing date-time-stamp to remote server from a local server (or vice-versa)? It will help if you can share more details on the set up and issue.
For date-format conversion, you can use CONVERT() or ALTER SESSION SET NLS_DATE_FORMAT (if its at session level).
Thanks.
Vikas S. Rajput -
יום שני 19 ספטמבר 2011 02:49