Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Convert seconds to minutes

Author  Topic 

overtmc
Starting Member

3 Posts

Posted - 2005-10-28 : 23:58:03
I need to convert 300.876 to 5:00.876 in classic asp. Can anyone help?

Kristen
Test

22859 Posts

Posted - 2005-10-29 : 00:34:14
SELECT RIGHT(CONVERT(varchar(24), DATEADD(Millisecond, 876, DATEADD(second, 300, 0)), 113), 9)

But it will round the milliseconds - so you'll get 05:00:877 in this instance)

Kristen
Go to Top of Page
   

- Advertisement -