|
V3R7M0 I convert days this way: D DS D DateCCYYMMDD 1 8S 0 D DateCYMDCC 1 2S 0 D DateCYMDYY 3 4S 0 D DateCYMDMM 5 6S 0 D DateCYMDDD 7 8S 0 D D DS D DateMMDDYY 1 6S 0 D DateMDYMM 1 2S 0 D DateMDYDD 3 4S 0 D DAteMDYYY 5 6S 0 0131.00 C Eval DateMDY = DateMMDDYY = APIvDt 0131.00 C Exsr MDYtoCYMD 0131.00 C If DateCCYYMMDD > ToDate 0129.00 C MDYtoCYMD BegSR 0130.00 C 0131.00 C Eval DateCYMDYY = DateMDYYY 0132.00 C Eval DateCYMDMM = DateMDYMM 0133.00 C Eval DAteCYMDDD = DateMDYDD 0134.00 C If DateCYMDYY >= 80 0135.00 C Eval DateCYMDCC = 19 0136.00 C Else 0137.00 C Eval DateCYMDCC = 20 0138.00 C EndIf 0139.00 C 0140.00 C EndSR Which, IMO, is not nice at all. But this is the only way I've really found to do it. I understand I can declare CYMD as a Date field, then move the month day and year in, but then I still have to check for the windowing, right? Isn't there some way to do this? And I do wish this list was archived, because I'm pretty sure the question has been asked and answered before. Has anyone stuck this question in a FAQ anywhere? The RPG manual is no help. That is, AS/400 ILE RPG/400 Programmer's Guide and AS/400 ILE RPG/400 Reference. These are Version 3. Regards, Jim Langston +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-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 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.