Converting Seconds Into HH:MM:SS Format Using SQL Server
Converting Seconds Into HH:MM:SS Format Using SQL Server
DECLARE @Seconds INT SET @Seconds = 90 SELECT REPLACE ( STR ( @Seconds / 3600 , LEN ( LTRIM ( @Seconds / 3600 )) + ABS ( SIGN ( @Seconds / 359999 ) - 1 )) + ':' + STR (( @Seconds / 60 ) % 60 , 2 ) + ':' + STR ( @Seconds % 60 , 2 ), ' ' , '0' ) AS TIME Output: 00:01:30
Read more →