how to make DEFAULT CENTURY be the current century

Deskin, Bob Bob.Deskin@Cognos.COM
Fri, 22 Jan 1999 17:10:02 -0500


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.