how to make DEFAULT CENTURY be the current century

Michael Lee mclsys@home.com
Mon, 25 Jan 1999 07:12:04 -0800


You seemed to have missed the point here. Right now you can specify a default
century in the dictionary. For the most part this is '19'. When the clock ticks
over to the year 2000 this should be changed to '20' and the dictionary
recompiled to reflect this. Not comfortable-but workable. This is what Bob was
talking about.

In the 819C version of the product, however, you can one better this by
specifying what is called the INPUT CENTURY. As part of the syntax you specify
the year to 'INPUT' if the user doesn't based on the value in the YY column. So
if you have specified "INPUT CENTURY 19 FROM YEAR 50' (as specified in Robert
Edis's e-mail) and the user has entered 75/01/01 the default century will be
'19'. If the user specifies the date 49/12/31 the default century will be '20'.

Both of the above is assuming your date field is large enough to store an
8-digit date.

Bob was suggesting that if you don't want to use the "INPUT CENTURY" you could
still use the old 'DEFAULT CENTURY'.


Michael Lee
MCL Systems Inc.



Shawn Gordon wrote:

> this seems like an incredibly juvenille hack for such a mature and
> expensive product.  Are you saying that PowerHouse can't automatically
> supply the value of the current century into a date by default?  Speedware
> does this without a thought.
>
> The premise is that a user can input a century if they wish to, but if they
> don't to default to the current century.
>
> thanks
>
> "Deskin, Bob" <Bob.Deskin@Cognos.COM> on 01/22/99 02:10:02 PM
>
> To:   "'powerh-l@lists.swau.edu'" <powerh-l@lists.swau.edu>
> cc:    (bcc: Shawn Gordon/IS/FHM/FHS)
> Subject:  RE: how to make DEFAULT CENTURY be the current century
>
> Blue is correct as to how to do what you want regarding defaulting the
> century. Typically you don't want just the current century, rather you want
> a century based on the year.
>
> If you really did want the current century regardless of the year, the
> easiest way is to change the default century in the dictionary at midnight
> on Dec 31, 1999. Once you've moved to 8.19, you don't have to recompile the
> application just to change the default century. Just change the dictionary
> and recompile it. Or have a recompiled dictionary ready to slide in. If you
> want to use the DEFAULT CENTURY, don't specify INPUT CENTURY.
>
> If you need to determine the current century, you can use the CENTURY
> function on SYSDATE. Assuming your dictionary option is century included.
> Saying CENTURY(SYSDATE) will return the current century. Of course the
> other
> way is to use DATEEXTRACT, extract the year, and strip the first two digits
> levaing the century.
>
> 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
>
> -----Original Message-----
> From: Robert J.M. Edis [mailto:Robert.Edis@creatcomp.com]
> Sent: Friday, January 22, 1999 2:33 PM
> To: 'Shawn Gordon'
> Cc: 'powerh-l@lists.swau.edu'
> Subject: RE: how to make DEFAULT CENTURY be the current century
>
> In the SYSTEMS options of the PHD use 'ALLOW CENTURY' and 'INPUT CENTURY 19
> FROM YEAR 50' for example.  If a user enters 990122 the century will
> default
> to 19; if they entered 290122 it would default to 20.  The 'ALLOW CENTURY
> gives them the option to enter the century if they wish.
>
> The syntax 'DEFAULT CENTURY 19' is used in functions such as ADDCENTURY.
> However the new CENTURY() function can use pivot year logic.
>
> It's all in the PH series 8 manual (only on CD ROM).
>
> Blue
> PowerHouse consultant
> Rhode Island, USA
>
> Disclaimer:
> The opinions and ideas expressed in this message are my own and have no
> relationship to my current employer, Initial Technical Staffing, its client
> CCI, or any of CCI's clients.
>
>      -----Original Message-----
>      From:     Shawn Gordon [SMTP:Shawn_Gordon@Notes.FH.Com]
>      Sent:     Friday, January 22, 1999 1:44 PM
>      To:  powerh-l@lists.swau.edu
>      Subject:  how to make DEFAULT CENTURY be the current century
>
>      We are upgrading to 8.19C3 and doing all our Y2K stuff, but my
> question is,
>      how do you make the DEFAULT CENTURY parameter be dynamic to pick up
> the
>      current century.  Do you need to just not specify it?  For example,
> I want
>      to allow people to enter the century with the date if they want to,
> but if
>      they don't we want to default to the current century.  We aren't
> going to
>      display any of the centuries in the reports or screens because no
> one
>      cares.
>
>      ideas?
>
>      thanks,
>      shawn
>
>      = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
> = = = =
>      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.
> = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
> 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.

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