• Subject: Re: L-date fields
  • From: Francis Lapeyre <flapeyre@xxxxxxxxxxxxxx>
  • Date: Thu, 18 Sep 1997 19:21:48 -0500
  • Organization: Communiqué, Inc. User

Neil Palmer wrote:
> 
> boothm@earth.goddard.edu wrote:
> >
> > Glenn, I understand that and do it regularly.  Date sold is yyyymmdd
> > in
> > the record and mm/dd/yy on the screen and in reports.  My point
> though
> > is
> > that d-o-b and a few others like that should be yyyymmdd in the
> record
> > too, but on screen and in reports I believe it should be mm/dd/yyyy.
> 
> mm/dd/yyyy on screen & reports !  yuuucchhhh !
> Isn't this the perfect opportunity to get rid of ambiguous dates ?
> What is 04-06-1997 ?   April 6th 1997 ?  Not necessarily.  In Europe
> it
> would be 04 June 1997.  However when you see 1997-04-06 is there any
> doubt that this is April 4th 1997 ?
> As we move towards a global economy, isn't it about time we all
> started
> writing dates the same way ?  I say give the users yyyy-mm-dd and
> don't
> take any crap from them !

[snip]

I was faced with the same problem trying to get our accounts receivable
system Y2K compliant. Fortunately for me, every file field is 7 digits
(CYYMMDD), so all I needed to do was create some ILE programs to do
common tasks, such as convert between 6 and 7 digit dates. We have a
machine in Australia, where they use DD/MM/YY, so the programs get the
system value for date format using the QWCRSVAL API and convert
accordingly. This means that the applications are not country dependent
(at least if the country in question speaks English, but that's another
thread). I also have one that goes to and from digit dates, one that
adds days to a date, and another that adds months to a date (or computes
the number of months between two dates, either rounded or truncated),
and one that computes the number of days between two dates. If we're
talking digit dates, these programs will convert to and from any date
from Jan. 1, 1900 through Dec. 31, 2899. (If using digit years, the
window is 1940-2039).

On our development system, there is a source member with samples on how
to implement them in current programs. Programmers are now required to
make any application they modify or create to use these modules for Y2K
compliance.

Sorry, but users are set in their ways, and I don't think that forcing
yyyy-mm-dd on them will fix anything. You will get invalid date messages
out the wazoo, and angry users flooding the help desk with complaints.

Our file dates are all CYYMMDD for a reason, that being that this system
has its origin on the S/38, and null capable date fields were not
available. The nice part is, to convert to native, we need only to
convert the programs to RPGIV, convert the files to use native null
capable dates, change the modules to use native dates, and a few other
small things, and we're ready to go. But, right now, we're having enough
fun just trying to get this system Y2K compliant. Most of the apps still
write dates to the file as YYMMDD, and ignore the century code. That has
to change -- NOW. That's what the modules, used properly, will do.
-- 
    Francis Lapeyre                       flapeyre@communique.net
    ____________________________________________________________
   |                                                            |
   |"The probability of life originating from accident is       |
   |comparable to the probability of the Unabridged Dictionary  |
   |resulting from an explosion in a printing factory."         |
   |                                                            |
   | --Prof. Edwin Conklin                                      |
   |____________________________________________________________|

****** Unsolicited commercial e-mail is not tolerated here. *******
****** Senders of such mail do so at their own peril.       *******
****** A copy, complete with header, is forwaded to the     *******
****** originating ISP for action.                          *******

      Opinions are my own. Otherwise, they are someone else's.
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to "MIDRANGE-L@midrange.com".
| To unsubscribe from this list send email to MAJORDOMO@midrange.com
|    and specify 'unsubscribe MIDRANGE-L' in the body of your message.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 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].