PHDATE - Element and Record

Deskin, Bob Bob.Deskin@Cognos.COM
Wed, 13 May 1998 15:22:28 -0400


I have embedded answers within the original message:

> ----------
> From: 	rshah@mcp.com[SMTP:rshah@mcp.com]
> Sent: 	Wednesday, May 13, 1998 3:34 PM
> To: 	powerh-l@lists.swau.edu
> Subject: 	PHDATE - Element and Record
> 
>      We are on 7.09.
>      
>      Can I change at the RECORD item level any date to be ZONED 8 even
> when 
>      it is having ELEMENT Definition of PHDATE INT*2 ?
Yes. The ELEMENT definition is a default to be used when you don't
specify anything at the ITEM level.
>      
>      I'm keeping SYSTEM OPTIONS - CENTURY Excluded - but expanding the
> 
>      databases to add in century. 
I would suggest that this strategy will not work if your application
does date calculations across centuries. Please read the article on
CENTURY INCLUDED by Matt Ohmes and myself in the latest issue of
SupportLink (vol 8 #2). The article is also available to supported
customers on the web site at
http://www.cognos.com/suppserv/custsupp/power2000/phcentury.html.
>      
>      We are keeping Element Definitions as is - but are expanding only
> the 
>      RECORD level definition. i.e expanding individual datasets.
>      
>      1) Is this going to fail because we did not change from PHDATE to
> 
>         something else at the ELEMENT level ?
As mentioned earlier, the ELEMENT definition is the default datatype and
will be overridden at the ITEM level. Of course, leaving the ELEMENT as
PHDATE may confuse future programmers.
>      2) Do we need to change to CENTURY INCLUDED ?
Yes, if you're going to do calculations across centuries or if you want
the DATE, LASTDAY, and SYSDATE functions to return century included
dates.
>      3) How will SYSDATE be treated with CENTURY EXCLUDED and how will
> it
>         be treated with CENTURY INCLUDED.
With CENTURY EXCLUDED you get a century excluded result (YYMMDD), with
CENTURY INCLUDED you get a centruy included value (YYYYMMDD).
>      
>      Finally,
>      If we keep CENTURY EXCLUDED in Systems Options
>      
>      Is it okay  to take DATE INPUTS from PARMS like
>      
>      DEFINE BEGIN-DATE DATE CENTURY INCLUDED = PARM PROMPT "Enter Date
> :" ?
Yes, this in itself will work. But other date calculations may fail.
>      
>      Any Ideas ??
Read the article and plan on changing to CENTURY INCLUDED and changing
the application logic appropriately. The only time you can stay with
CENTURY EXCLUDED as your system option is if all of your date
calculations are within one century and that century is the default
century. This is very rare.
>      Regards,
>      Roshan
> = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
> = = =
> 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.
> 
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


= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
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.