当前位置:Gxlcms > 数据库问题 > sql server 计算两个时间 相差的 几天几时几分几秒

sql server 计算两个时间 相差的 几天几时几分几秒

时间:2021-07-01 10:21:17 帮助过:4人阅读

	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 

  

sql server 计算两个时间 相差的 几天几时几分几秒

标签:sql   clu   diff   date   时间   serve   varchar   arch   ted   

人气教程排行