convert seconds to hh:mm:ss format in sql

 Admin   
20 View    Nov 16 2020 5:38PM

SELECT RIGHT('0' + CAST(@TimeinSec / 3600 AS VARCHAR),2) + ':' +  

RIGHT('0' + CAST((@TimeinSec / 60) % 60 AS VARCHAR),2) + ':' +  

RIGHT('0' + CAST(@TimeinSec % 60 AS VARCHAR),2)