sql server 计算两个时间 相差的 几天几时几分几秒
程序员文章站
2022-08-17 17:30:05
CAST ( CAST ( DATEDIFF ( ss, StartTime, ConcludeTime ) / ( 60 * 60 * 24 ) AS INT ) AS VARCHAR ) + '天' + CAST ( CAST ( DATEDIFF ( ss, StartTime, Conclu... ......
cast ( cast ( datediff ( ss, starttime, concludetime ) / ( 60 * 60 * 24 ) as int ) as varchar ) + '天' + cast ( cast ( datediff ( ss, starttime, concludetime ) % 86400 / 3600 as int ) as varchar ) + '小时' + cast ( cast ( datediff ( ss, starttime, concludetime ) % 3600 / 60 as int ) as varchar ) + '分' + cast ( cast ( datediff ( ss, starttime, concludetime ) % 60 as int ) as varchar ) + '秒' lengthoftime
下一篇: 通过devmem访问物理地址