求时间字段与输入时间点的时间差j绝对值,最后取最小时间差
SELECT min(ABS(DATEDIFF(MILLISECOND,'2019-12-18 14:11:00.000' ,s.Time))) AS diff FROM EnergyConsumptions AS s
版权声明
作者:扶我起来我还要敲
地址:https://www.cnblogs.com/Newd/p/12931111.html
© Newd 尊重知识产权,引用请注出处
广告位
(虚位以待,如有需要请私信)