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


  • Subject: RE: Date fields and moving from yyyymmdd to mmddyy
  • From: Buck Calabro <buck.calabro@xxxxxxxxxxxxxxxxx>
  • Date: Tue, 8 Feb 2000 11:47:26 -0500

Booth wrote:

>I think what irritates me most though is that we can 
>not use the new solution to move an 8-digit date to 
>a 6-digit date outside the 40-39 window.  

Wow, am I a PITA today!  :-)  I never use *MDY or other "6-digit dates."  To
me, they aren't dates at all (because of the inherent window limitations).
I store the dates in the database as *ISO and convert to a 6 digit format
for display/print using a data structure and a subroutine / procedure to
convert from the date datatype to numeric.  This way, I get the utility of
true date datatype without the window hassle for displaying truncated
(6-digit) dates.  Of course, many users are getting accustomed to seeing
2000-02-11 instead of 2/11/00...

DRealDate         DS                                    
D ISODate                         D   DATFMT(*ISO)
D   ISOCC                        2  0 Overlay(ISODate:1)
D   ISOYY                        2  0 Overlay(ISODate:3)
D   ISOCCYY                      4  0 Overlay(ISODate:1)
D   ISOMM                        2  0 Overlay(ISODate:6)
D   ISODD                        2  0 Overlay(ISODate:9)

D DsplyDate       ds                                     
D  DSPDate                       6S 0 inz                
D   DSPMM                        2  0 Overlay(DSPDate:1) 
D   DSPDD                        2  0 Overlay(DSPDate:3) 
D   DSPYY                        2  0 Overlay(DSPDate:5) 

 * Tinker date for display                 
C                   Eval      DSPMM = ISOMM
C                   Eval      DSPDD = ISODD
C                   Eval      DSPYY = ISOYY
C     DSPDate       dsply

Buck Calabro
+---
| 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 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.