× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Oops... forget the third parms *MINUTES in the %diff bif.

On Thu, Aug 9, 2012 at 2:09 PM, Michael Schutte <mschutte369@xxxxxxxxx>wrote:

Booth,

Just found out Robert is at my old place of employment. From what I recall
about the data, the time is a four digit numeric field.

Should be as simple as

timeinminutes = %Diff(%Time(field1*100:*HMS):%Tmie(field2*100:*HMS));


On Thu, Aug 9, 2012 at 1:55 PM, Booth Martin <booth@xxxxxxxxxxxx> wrote:

If they really are time fields there isn't a problem. %diff(time2 -
time1: *m) works just fine.

If they are 4 digit numbers that represent time then you may need to do
a string = %char(%hours(%subst(...))) + ":" + %char(%minutes(%subst(...)))

time = %time(string:*USA);

When you finally have all those minutes, you can convert all those
minutes to HH:MM by adding them to a time of 00:00:00.

(There is probably a mistake i=of some kind in there, but that is the
general idea.)

On 8/9/2012 12:38 PM, Robert Munday wrote:
I neglected to provide the appropriate details in my recent request.

I have two four digit time fields. They are not part of a date nor are
they date dependent.

If necessary, I could cobble up timestamp fields for comparison.

Thanks,



Robert Munday
Munday Software Consultants
Montgomery, AL
on assignment in Columbus, OH



--
Booth Martin
802-461-5349
http://www.martinvt.com
--
This is the RPG programming on the IBM i / System i (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 thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.