Let's Get Social!
 Go New Search Notify Tools Reply
 Seconds Routine
Virtuoso
 posted February 28, 2005 07:40 PM
Anyone know a good Routine to convert seconds into Hour/Minutes/Seconds? I don't know why my Brain is having a problem with this?

Prarie

 Posts: 1903 | Location: San Antonio | Registered: February 28, 2005 IP
Master
 posted February 28, 2005 08:22 PM Hide Post
Divide by 60 gives you minutes divide minutes by 60 gives you hours

MINUTES/I9 = SECONDS/60;
HOURS/I9 = MINUTES/60;

 Posts: 865 | Registered: May 24, 2004 IP
Virtuoso
 posted February 28, 2005 08:28 PM Hide Post
Well yes that works...I was just thinking of some routine...that made it all come together.
If you have 244 seconds...I need it to read
00:04:04

 Posts: 1903 | Location: San Antonio | Registered: February 28, 2005 IP
Virtuoso
 posted March 01, 2005 02:04 AM Hide Post
So easy in APL. Tedious in Focus.
hhmmss/I6=

INT( seconds/3600 ) * 10000
+ INT( IMOD(seconds,3600,'I4')/60 ) *
100
+ I
MOD(seconds,60,'I2');
time/A8=EDIT(hhmmss,'99:99:99')

This message has been edited. Last edited by: <Mabel>,

 Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005 IP
Virtuoso
 posted March 01, 2005 12:17 PM Hide Post
That Works! Thanks so much...I knew there was some trick out there somewhere.

 Posts: 1903 | Location: San Antonio | Registered: February 28, 2005 IP