× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Peter,

Yes, you copied wrong.  Here's the d-specs used in the message:

D #DateEUR        S               D   DatFmt(*EUR)   
D #DateISO        S               D   DatFmt(*ISO)   
D #TimeISO        S               T   TimFmt(*ISO)   
                                                     
D #DatNumEUR      S              8S 0 Inz(22032001)  
D #DatNumISO      S              8S 0                
D #DatNum6        S              6S 0                
D #DatNum7        S              7S 0                

Noticed that #DatNumISO is indeed a numeric.  The date data type is named
#DatISO.

HTH,
Charles


> -----Original Message-----
> From: Peter Vidal [mailto:Peter_Vidal@xxxxxxxx]
> Sent: Tuesday, April 13, 2004 1:58 PM
> To: RPG programming on the AS400 / iSeries
> Subject: RE: CYYMMDD date to *ISO and back

Please look for the following lines:
:
D #DateISO        S               D   DatFmt(*ISO) 
:
D #DatNum7        S              7S 0 
:
 #DatNum7=1030704; 
:
// Add 3 days to #DatNum7 and convert the result to #DatNumISO 
  #DatNumISO = %int(%char(%date(#DatNum7:*cymd) + %days(3):*iso0)); 
:
 // Convert date field to numeric field 
  #DatNum7=%int(%char(#DateISO:*cymd0)); 

Did I copied something wrong?  Why they have the "%int(%char..." part on 
the statements?

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.