Date Parm Problem
Deskin, Bob
Bob.Deskin@Cognos.COM
Wed, 15 Jul 1998 12:13:57 -0400
If a date is century excluded, PowerHouse assumes it is within the
DEFAULT CENTURY. Also, PowerHouse knows that Feb 29, 1900 is an invalid
date. As Kevin Gordon suggests, you can get around this by setting the
DEFAULT CENTURY to 20. However, keep in mind that the default century is
added to all century excluded dates and date expressions when used in
date functions. Matt Ohmes and I wrote an article in a recent
SupportLink about the effects of CENTURY INCLUDED and DEFAULT CENTURY.
If you didn't see it, it's also on our web site at
http://www.cognos.com/suppserv/custsupp/power2000/phcentury.html. I
strongly recommend that everyone read it as there's lots of
misinformation going around and misunderstanding.
Bob Deskin
Senior Product Advisor bob.deskin@cognos.com
Cognos Inc. (613) 738-1338 ext 4205 FAX: (613) 228-3149
3755 Riverside Drive P.O. Box 9707 Stn. T, Ottawa ON K1G 4K9 CANADA
> ----------
> From:
> Calvin.Dimsha@gsle.gensig.com[SMTP:Calvin.Dimsha@gsle.gensig.com]
> Sent: Wednesday, July 15, 1998 8:52 AM
> To: powerh-l@lists.swau.edu
> Cc: John.Hornberger@gss.gensig.com; Vicki.Irwin@gsle.gensig.com;
> hnasro@aol.com
> Subject: Date Parm Problem
>
> 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.
>
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
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.