|
245 / 60 = 4 with Remainder of 5 mins. Thus 4 hours and 5 minutes. That exceeds an hour doesn't it? Ron Power Programmer Information Services City Of St. John's, NL P.O. Box 908 St. John's, NL A1C 5M2 Tel: 709-576-8132 Email: rpower@xxxxxxxxxx Website: http://www.stjohns.ca/ ___________________________________________________________________________ Success is going from failure to failure without a loss of enthusiasm. - Sir Winston Churchill rob@xxxxxxxxx Sent by: rpg400-l-bounces@xxxxxxxxxxxx 31/01/2005 01:33 PM Please respond to RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> To RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> cc Subject Re: Converting minutes to hours/minutes I like my solution better. What happens if the duration exceeds an hour? But, in some cases, your solution would work. D mytime s t timfmt(*hms) D DspChar s 5a /free clear mytime; mytime += %minutes(175); DspChar = %subst(%char(mytime):1:5); dsply mytime; dsply DspChar; Rob Berendt -- Group Dekko Services, LLC Dept 01.073 PO Box 2000 Dock 108 6928N 400E Kendallville, IN 46755 http://www.dekko.com Scott Klement <rpg400-l@xxxxxxxxxxxxxxxx> Sent by: rpg400-l-bounces@xxxxxxxxxxxx 01/31/2005 11:50 AM Please respond to RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> To RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> cc Subject Re: Converting minutes to hours/minutes > C timestamp2 subdur timestamp1 mins:*mn 5 0 > > Now I need to convert the 'mins' to hour/minute. I checked the RPG ILE > manual and only can find the *mn or *h. Perhaps I'm not understanding the situation. Wouldn't converting it to hours/minutes be as simple as dividing it by 60 and taking the remainder? -- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l. -- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.