Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Member
154 Points
507 Posts
Apr 06, 2012 04:22 PM|LINK
Hi everybody,
I have a table like this:
Equipement time
eq1 4545
eq2 3454
....
I would like to show theresult like this:
eq1 75:75
eq2 57:56
I tried this code
select Equipement, cast(time/60 as varchar(5)) + ':' + RIGHT('0' + cast(time%60 as varchar(2)), 2) AS time order by time DESC
The problem is that I don't get a right order and sometimes I get a strange result like this 323:4*
salim20001
Member
154 Points
507 Posts
Converting minutes to hours and minutes
Apr 06, 2012 04:22 PM|LINK
Hi everybody,
I have a table like this:
Equipement time
eq1 4545
eq2 3454
....
I would like to show theresult like this:
Equipement time
eq1 75:75
eq2 57:56
....
I tried this code
select Equipement, cast(time/60 as varchar(5)) + ':' + RIGHT('0' + cast(time%60 as varchar(2)), 2) AS time order by time DESC
The problem is that I don't get a right order and sometimes I get a strange result like this 323:4*