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
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Query To Convert Time

Author  Topic 

ladiaocb
Yak Posting Veteran

57 Posts

Posted - 2008-07-24 : 16:19:23
Hey All,

Need help. I'm trying to use a query that will convert minutes into hours/minutes. For example, 510mins = 8hr 30mins. As always any help is appreciated!!

Chris

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2008-07-24 : 17:48:56
[code]select
Hours = minutes/60,
Minutes = minutes%60
from
(
-- Test Data
select minutes = 510
) a

Results:
Hours Minutes
----------- -----------
8 30

(1 row(s) affected)

[/code]

CODO ERGO SUM
Go to Top of Page

ladiaocb
Yak Posting Veteran

57 Posts

Posted - 2008-07-24 : 18:18:57
Thanks much!
Go to Top of Page
   

- Advertisement -