× 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.



 >> Will this work in 5.1?

Nope - the ability to use a character parm to %Int didn't arrive until V5R2.
You'd have to use a DS to convert the char fields to numeric.  Like so:

     D DateData        DS
     D   mdy                          6S 0
     D   mdyAlpha                     6A   Overlay(mdy)
     D   ymd                          6S 0

      /Free

       monitor;
         // assign result to alpha version, mdy will then have the numeric
value
         mdyAlpha = %Char (%Date (ymd: *YMD): *MDY0);

       on-error;   // catch bad date

          // do whatever you do with a bad date
       endmon;

Alternatively if you don't mind being attacked by your fellow programmers,
use Hans' %rem(%int(numdate*10000.01):1000000)

Jon Paris
Partner400
www.Partner400.com



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.