Hello, i have a column in my database that is a varchar, and I am trying to convert it to a date time the time is in UTC, and I need to get this into Human read date time.
time stamp
1488219517998
SQL that returns the wrong dates
Select CAST(SWITCHOFFSET(CAST(DATEADD(SECOND,CONVERT(bigint, CreateTime) /1000 + CONVERT(bigint, CreateTime) % 1000 + 8*60*60, '19700101') AS DATETIMEOFFSET),'-05:00') AS DATETIME2)from ME_API_Requests_HistoryWHERE Technician = 'chris jones'AND Status = 'Open'