sql sever 时间差 小时

DATEDIFF(类型,开始时间,结束时间)

DATEADD(类型,时间间隔,时间)

CAST(数据 as 转换类型)

DATEDIFF(HOUR,DATEADD( HOUR,sf.kaiShiShiJian_hour , CAST( sf.kaiShiShiJian_date AS DATETIME) ), DATEADD( HOUR,sf.jieShuShiJian_hour , CAST(sf.jieShuShiJian_date  AS DATETIME) )) chiXvShiJian,
posted @ 2020-06-16 16:03  唯爱金生  阅读(794)  评论(0编辑  收藏  举报