sql-serverlimitepochyear2038

How to remove TIME on Epoch in SQL Server


How to remove TIME on Epoch format in SQL Server?

Example: 2713795200000 should return Thu, 30 Dec 2055 00:00:00 instead of Thu, 30 Dec 2055 16:00:00 GMT.


Solution

  • You can use below query for your problem. May be its helps you.

    SELECT  DATEADD(DAY, (2713795200000)/(1000*60*60*24), '19700101')