|
You could dynamically build a SQL Statement using DAYS, MONTHS, YEARS and then cast them back to integer. Thanks, Mark Mark D. Walter Senior Programmer/Analyst CCX, Inc. mwalter@xxxxxxxxxx http://www.ccxinc.com "Peter Dow" <maillist@dowsoft ware.com> To Sent by: "RPG programming on the AS400 / rpg400-l-bounces@ iSeries" <rpg400-l@xxxxxxxxxxxx> midrange.com cc Subject 02/15/2005 02:52 Re: PROTOTYPING - What type of data PM are values as *MONTH, *DAY, *SYS Please respond to RPG programming on the AS400 / iSeries <rpg400-l@midrang e.com> Oh. I ran into that with the %char bif as well. Until a variable is allowed for the format, I simply have a long IF/ELSEIF statement that translates a constant to the appropriate %char statement; it appears Igor would have to do something similar. Peter Dow Dow Software Services, Inc. 909 793-9050 voice 909 793-4480 fax 951 522-3214 cell ----- Original Message ----- From: "Wilt, Charles" <CWilt@xxxxxxxxxxxx> To: "RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx> Sent: Tuesday, February 15, 2005 10:19 AM Subject: RE: PROTOTYPING - What type of data are values as *MONTH, *DAY, *SYS No he wants to do the following: /free wResults = CalcDiff(wDate1 : wDate2 : *DAYS); wResults = CalcDiff(wDate4 : wDate5 : *MONTHS); /end-free p CalcDiff b d CalcDiff pi 10i 0 d date1 d d date2 d d fmt ?????????? /free return %diff(date1:date2:fmt); /end-free HTH, Charles Wilt iSeries Systems Administrator / Developer Mitsubishi Electric Automotive America ph: 513-573-4343 fax: 513-398-1121 -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 265.8.8 - Release Date: 2/14/2005 -- This is the RPG programming on the AS400 / iSeries (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 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.