Difference of two datetime columns caused overflow at runtime

出现这个SQL错误的原因是,计算时间的差值超过了SQL内最大的数值范围导致的,就如下例子:

SELECT    DATEDIFF(second, '2018-12-07 04:11:28.000','1901-01-01 04:11:28.000')   AS 时间差距

猜你喜欢

转载自www.cnblogs.com/YzpJason/p/10332504.html
two