Problem with Date(days()) functions
Deskin, Bob
Bob.Deskin@Cognos.COM
Thu, 8 Apr 1999 11:19:51 -0400
The problem is that you have CENTURY EXCLUDED as the dictionary option. With
that, any result of the DATE function must be within the DEFAULT CENTURY.
Also, when a value with a zero century is used in the DAYS function, it adds
the DEFAULT CENTURY before calculating the number of days. The INPUT CENTURY
option is strictly used for QUICK, QUIZ, and QTP date input into century
included dates. It is not a global windowing option. Please read the article
I mentioned. All of this is explained there.
Bob Deskin
Senior Product Advisor, Application Development Tools, Cognos Inc.
bob.deskin@cognos.com (613) 738-1338 ext 4205 FAX: (613) 228-3149
3755 Riverside Drive P.O. Box 9707 Stn. T, Ottawa ON K1G 4K9 CANADA
-----Original Message-----
From: Joseph Northrop [mailto:jay_northrop@yahoo.com]
Sent: Thursday, April 08, 1999 10:54 AM
To: powerh-l@lists.swau.edu
Subject: RE: Problem with Date(days()) functions
First of all, let me thank everyone for the responses
to my date problem.
Upon looking at my original program again, I find
that I made an error in my original post from
yesterday.
The date that I am trying to manipulate is being
stored as a numeric 6. Our client stores all of
their dates as numeric 6.
For the purpose of this message, I will hard code a
num*6 date into my example:
DEFINE DT NUM*6 = 000101
DEFINE ND NUM*6 = DATE(DAYS(DT)-4)
I have tried various fixes for this, and the latest
one was in the dictionary, I set INPUT CENTURY
19 FROM 20 and CENTURY EXCLUDED DEFAULT 20.
This works fine for all dates except for when the
subtraction of 4 days from the date results in a
date in a different century than the input date.
(such as 000101) I get a 0 for ND and a data
conversion error. When I set the dictionary
to CENTURY INCLUDED DEFAULT 20 with
INPUT CENTURY 19 FROM 20, I get correct
dates with a 4 digit year (8 digit total) from a
field that is supposed to be a numeric 6! Yes,
we can convert it to CHAR and lop off the
century, but we were hoping not to have to do
that...we have a lot of programs effected by
this. Plus we are concerned about what else
this may effect that we aren't aware of.
I'm not sure where to go with this. Any help
would be appreciated.
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
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.