|
Angie, The multiplier value is 10000.0001 The same value works for conversions both ways. Now, having given what you asked for, let me say that THIS TYPE OF DATE CONVERSION IS NOT RECOMMENDED, IMO. I would suggest using data structures, substring concatination, or some other non-algebraic conversion method. Perfomance issues asside, you'll be saving yourself some grief later on by not using the multiplier method. Why you might ask? For starters, if/when you convert this code to RPGIV, it won't work. RPGIV does not handle numeric truncation like RPGIII. Second, it's not really very clear what this conversion is doing, actually worse than it was when using 6 digit dates, since the conversion factor is the same for both conversions. In the future, it may be difficult to determine what format a field is supposed to hold (is it MMDDYYYY or is it YYYYMMDD). It's possible to get around both of the problems with compiler options and good documentation, but it still seems to me that a standard date conversion subroutine is preferable. JMO eric.delong@pmsi-services.com ______________________________ Reply Separator _________________________________ Subject: Date * 10000.01 Author: <MIDRANGE-L@midrange.com > at INET_WACO Date: 11/18/98 8:13 AM Someone posted a multiplier that can be used to change an 8,0 date from mdy to ymd and vice versa using the same multipier. I can not find that, and was hoping someone could re-post it. This is just a huge help for programs that are not yet converted to RPG1V. Thanks in advance, Angie Wawrzaszek +--- | 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 +--- +--- | 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 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.