PowerHouse date function not quite a bug
Robert J.M. Edis
Robert.Edis@creatcomp.com
Thu, 15 Oct 1998 09:51:21 -0400
Thanks a lot for your input Bob.
I still want a couple of things spelled out though.
You said if we use a DATE data type in PH when the PHD is set to CENTURY
EXCLUDED the result will be a 6 digit date. I used this data type in a
DEFINE ... = PARM FORMAT MMDDYYYY and the result included a century,
either 19 or 20 as the case may be. I also used CENTURY INCLUDED on the
DEFINE statement.
The DAYS function correctly returns the right number of days, e.g.
DEFINE date1 DATE CENTURY INCLUDED = PARM FORMAT MMDDYYYY
DEFINE days1 = DAYS(date1) - 5
DEFINE date2 DATE CENTURY INCLUDED = DATE(days1)
REPORT date1 FORMAT MMDDYYYY &
days1 PICTURE " ^^^,^^^" &
date2 FORMAT MMDDYYYY
DATE1 DAYS1 DATE2
12/31/1999 36,519 12/26/1999
01/01/2000 36,520 12/27/1999
01/06/2000 36,525 DCE
As you can see, date1 stores the correct century. The number of days in
case 3 translates to 01/01/2000. It appears to me from what you say is
that the DATE() function strips the century (20). That's fine. But
01/01/1900 is a valid date.
Is the result of the function actually returning 00000101, i.e. century
zero, and this is causing the DCE?
Blue
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
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.