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 Mintues into Hours and minutes

Author  Topic 

reddy_abi
Starting Member

1 Post

Posted - 2008-11-14 : 00:07:26
I have a query. I need to convert minutes into hours( min into hh:mm) For example 200 min into 3hrs 20min. How do you write a program for that ?

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-11-14 : 00:41:11
select minutevalue/60 AS hrs,minutevalue%60 AS Minutes FROM Table
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-11-14 : 01:24:44
select dateadd(minute,200,0)

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-11-14 : 02:04:10
If value of minutes exceeds 1440, try this
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=107275



E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page
   

- Advertisement -