|
Why would anyone store a date in an 8,2 field?
Actually I often wonder why anyone would store a date in a numeric field in the first place. But, let's get to the problem.
Starting with here
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/books/sc092508.pdf
Search for the %timestamp bif (built in function). When you find that you will see that you will have to take those numerics and convert them to character. After doing that you will have to appropriately concatenate them, and some separator characters, into a character representation of a time stamp. You'll see all that at that reference.
Once you have the first timestamp, and the second timestamp, research the %diff bif, and you're in like Flynn.
Please take no offense at this RTM suggestion - I meant none.
Many people will take this and create their own bif. They do this by creating a "subprocedure". This allows you to do something like
TimeStampOne=ConvertToTimestamp(My80DateOne : My60TimeOne);
TimeStampTwo=ConvertToTimestamp(My80DateTwo : My60TimeTwo);
MinutesSpread=%diff(TimeStampOne : TimeStampTwo : *minutes);
Rob Berendt
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.