Date Parm Problem

Calvin.Dimsha@gsle.gensig.com Calvin.Dimsha@gsle.gensig.com
Wed, 15 Jul 1998 08:52:56 -0400


We are using Quiz v7.29.c8 on HP3000 MPE/ix v5.5 pp4.

Our 3rd party business application has chosen "1950 logic" to be year 2000 
compliant, therefore the Image databases will continue to store 6 digit 
dates.  All date prompts in the software will continue to be 6 digit.

We are in the process of revising over 1000 Quiz reports to make them year 
2000 compliant, using the same "1950 logic."  Dates used in comparisons or 
sorts, whether from the database or input by the user, will be converted to 
CENTURY INCLUDED, all transparent to the user.

For example:

DEFINE DATE-IN DATE = PARM PROMPT "Enter date (YYMMDD): "
;remember: dictionary is "century excluded"
;date-in is 6 digit by default
DEFINE DATE-OUT DATE CENTURY INCLUDED = & 
 19000000 + DATE-IN IF DATE-IN > 500101 ELSE &
 20000000 + DATE-IN IF DATE-IN > 0
;use date-out in compares, sorts, and output

The Problem:
------------
This works for all dates except 2/29/2000 which would be input as 000229.  
When that date is input an error message results because it is interpreted 
as 2/29/1900 which did not exist.

I could change DATE-IN to CENTURY INCLUDED, but I'm afraid of mass 
confusion among the users, not to mention plenty of job streams which would 
also need revising.  No thanks.

The only viable workaround I see is to define DATE-IN as NUM*6.  The 
problem with that is users could enter any number, even if it is not a 
valid date.

Am I missing something?  I there some easy solution?  Is there a way to 
make 2/29/1900 a valid date?  (We don't have any data older than 1980.)

Calvin Dimsha
GS Laboratory Equipment
Asheville, NC
calvin.dimsha@gsle.gensig.com

The views expressed here are mine and do not reflect the official policy of 
my employer or the organization through which the Internet was accessed.
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
powerh-l@lists.swau.edu is gatewayed one-way to bit.listserv.powerh-l
This list is closed, thus to post to the list, you must be a subscriber.