Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
2 つの日付の差を日時形式で取得する必要があります: HH:mm:ss. T-SQL関数を使用することは可能ですか? 私はいつも使っDATEDIFFていましたが、戻ってくるだけintです。
HH:mm:ss
DATEDIFF
int
declare @date1 datetime = '2012-08-04 12:10' declare @date2 datetime = '2012-08-04 13:10' select cast(@date2 - @date1 as time(0))