declare @mydate integer select @mydate = 1473861331 SELECT CAST(CAST(@mydate AS VARCHAR) AS DATETIME) But I receive this error Conversion failed when converting date and/or time from character string.
declare @mydate integer set @mydate = 1473861331 select DATEADD(hour,-5,(dateadd(second ,@mydate, '1/1/1970'))) --Result: 2016-09-14 08:55:31.000
CAST
CONVERT
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)