4

In MySQL there is function called CONVERT_TZ(dt,from_tz,to_tz) which converts one timezone to another timezone -Reference-.

I had used CONVERT(datetime,SWITCHOFFSET(CONVERT(datetimeoffset,getdate()),'+05:30')) this function is taking "+00:00" timezone offset which I don't wanted.

Is there any function in the SQL or any other way to convert timezone in SQL Server?

shA.t
  • 16,580
  • 5
  • 54
  • 111
NHD
  • 435
  • 1
  • 6
  • 17
  • I think [this question](http://dba.stackexchange.com/q/39421/60970) can help you ;). – shA.t Jul 27 '15 at 10:42
  • SQL Server **2008** and newer have [`SWITCHOFFSET`](https://msdn.microsoft.com/en-us/library/bb677244.aspx) and `DATETIMEOFFSET` datatype – marc_s Jul 27 '15 at 10:51

0 Answers0