Skip to main content
2 of 2
Replaced the outdated link to MSDN blog with one to the article on the Wayback Machine at archive.org and clarified wording that modern versions have good support for time zones
Hannah Vernon
  • 70.5k
  • 22
  • 177
  • 321

The best way to convert a non-current UTC date into local time, prior to SQL Server 2016, is to use the Microsoft .Net Common Language Runtime, or CLR.

The code itself is easy; the difficult part is usually convincing people that the CLR isn't pure evil or scary...

For one of the many examples, check out Harsh Chawla's blog post on the topic.

Unfortunately, there is nothing built-in prior to SQL Server 2016 that can handle this type of conversion, save for CLR-based solutions. You could write a T-SQL function which does something like this, but then you'd have to implement the date-change logic yourself, and I'd call that decidedly not easy.