生成10位时间戳格式

DECLARE @time DATETIME = GETDATE()

SELECT DATEDIFF(S,'1970-01-01 00:00:00', @time) - 8 * 3600

GO

更多推荐

SqlServer生成时间戳