Convert Epoch to DateTime SQL Server (Exceeds Year 2038)
问题 How to convert Epoch to DateTime SQL Server if epoch exceeds the year 2038? Answer in Convert Epoch to DateTime SQL Server will not work. Example: SELECT DATEADD(ss, 2713795200000 / 1000, '19700101') Thu, 30 Dec 2055 16:00:00 GMT 回答1: DATEADD function assumes an INT as an increment to your date, to bypass the limitation of INT you can either reduce the precision of your epoch, or do a slightly complex code to retain the precision of your epoch. This reduces the precision to minutes: SELECT