SQL Clone
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

UDF Function to convert seconds to HH:MM:SS format

By aziz,

SFormat is UDF function that can convert
seconds to HH:MM:SS
1- Select dbo.SFormat(130) will return 00:02:10
2- Select dbo.SFormat(dbo.test.Duration) as Dur (to be used with tables). where 'Test' is table name and 'Duration is a field(int).

Total article views: 329 | Views in the last 30 days: 2