Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Math Help with minutes to HH24:MI 1

Status
Not open for further replies.

sahernandez

Programmer
Oct 1, 2002
69
0
0
SV

Hi, I just want to know the optime way to do this:

I have
Minutes ----- > HH24:Mi
25 00:25
5 00:05
125 02:05

I just want to transform the minutes to a easy way to read.

HELP ME!!!
 
I am sure there's a much prettier way of doing it, but I just tried:

select to_char(to_date(to_char(180*60),'SSSSS'),'HH24:MI') from dual;

= 03:00

 
select trunc(<minutes_here>/60)||':'
||to_char(mod((<minutes_here>,60),'09') from dual;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top