Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2003-11-13 : 08:13:56
|
| Kris writes "I need to convert a unix timestamp to local datetime in SQL server. I tried to redirectly calculate the timezone offset by select @l_TimeZoneOffset = DateDiff(hh, GETUTCDATE(), getdate())The problem is we have daylight saving in Australia. The calculation only reflect the current date timezoneOffset. But the timestamp may be in/not in the daylight saving period.Is there any way to find out the timezone Offset by a given date in the SQL server DTS package?I am using SQL server 2000 and window 2000/xp platform." |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2003-11-13 : 08:21:29
|
| You can write an ActiveX step in JScript. The JScript Date objects can return a timezone offset (and a date containing it) This should give you some help:http://msdn.microsoft.com/library/en-us/script56/html/js56jsobjdate.aspYou should be able to manipulate the date in JScript and calculate a valid SQL Server date value for it. |
 |
|
|
|
|
|