Anda dapat mencoba:
DECLARE @HOURS decimal(7,4) = 20.5599
SELECT CAST(CONVERT(VARCHAR,DATEADD(SECOND, @HOURS * 3600, 0),108) AS TIME)
keluaran :20:33:35
Tapi ingat:Ketik Waktu di MSSQL hanya di bawah 24 jam
Jika Anda ingin lebih dari 24 jam, coba:
DECLARE @HOURS decimal(7,4) = 25.5599
SELECT
RIGHT('0' + CAST (FLOOR(@HOURS) AS VARCHAR), 2) + ':' +
RIGHT('0' + CAST(FLOOR((((@HOURS * 3600) % 3600) / 60)) AS VARCHAR), 2) + ':' +
RIGHT('0' + CAST (FLOOR((@HOURS * 3600) % 60) AS VARCHAR), 2)
keluaran :25:33:35
-- Perbarui
Menit desimal hingga lebih dari 24 jam
DECLARE @MINUTES decimal(7,4) = 77.9
SELECT
RIGHT('0' + CAST (FLOOR(COALESCE (@MINUTES, 0) / 60) AS VARCHAR (8)), 2) + ':' +
RIGHT('0' + CAST (FLOOR(COALESCE (@MINUTES, 0) % 60) AS VARCHAR (2)), 2) + ':' +
RIGHT('0' + CAST (FLOOR((@MINUTES* 60) % 60) AS VARCHAR (2)), 2);
keluaran:01:17:54