• Subject: Re: Query........Manipulating TimeFields
  • From: "Charly Jones" <charly301@xxxxxxxxxxx>
  • Date: Fri, 14 Jul 2000 17:05:37 GMT


>From: boldt@ca.ibm.com
>
>John wrote:
> >Could someone please point me to some reference material on how
> >to work with fields containing time stored as a numeric (len6,
> >dec 0.)  Specifically, I need to calculate elapsed time between
> >twor or more time fields.  Seems to me I need to create a Result
> >Field but am not certain of the correct formula to to the
> >calculations between time1 and time 2 to get Elapsed_Time.
>
... <SNIP> ...
>
>(Yeah, I know, you probably want an answer relating to RPG III.
>But learning RPG IV is really a "no-brainer" and doing the time
>computations in RPG IV are a heck of a lot easier than figuring
>out some complex formulas.)
>
>Cheers!  Hans
>
>Hans Boldt, ILE RPG Development, IBM Toronto Lab, boldt@ca.ibm.com
>

Sometimes simple problems don't require the latest and greatest
whiz-bang new fangled language.  This problem doesn't seem very
complex to me:

start.time.in.seconds = seconds + (minutes * 60) + (hours * 3600)

end.time.in.seconds = seconds + (minutes * 60) + (hours * 3600)

Once you have the times expressed in seconds, the math is
pretty simple.  Answer expressed in seconds.

No C required.  No Java required.  No AD/Cycle required.
No SAA required. No Personal Computer involved.  SEU can
be used to enter the source code.  No system API required.

Call me Neanderthal if you wish...

Charly Jones
Curator of the IBM GSD Museum
Gig Harbor
Washington


________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.