Here is a quick function that you can plug into your sql query to convert a field that has UTC time to local time:
dateadd(hour, DATEDIFF (HH, GETUTCDATE(), GETDATE()), Timestamp) as ltime
Where Timestamp should be replaced by the field in your table that contains date-time in UTC.
No comments:
Post a Comment