1、時間轉秒
如23:59:59秒轉換成秒數
select datediff( s,‘00:00:00’,‘23:59:59’)
轉換結果為86399
2、秒轉時間
如16899秒轉換成時間
select convert(varchar(8),dateadd(ss,16899,108),108)