DATETIME Convert UTC to Local


/ Published in: SQL
Save to your folder(s)

How to convert a column of DATETIME UTC to local time.


Copy this code and paste it in your HTML
  1. SELECT DATEADD(HOUR,DATEDIFF(HOUR,GETUTCDATE(),GETDATE()),[COLUMN]) AS "Column" FROM [TABLE]

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.