Tom Lane <[EMAIL PROTECTED]> writes:
> If we make CC treat 2000 as being in the 20th century, what should YY
> do?
Report "00", IMVHO. There's no year "0" so year 1 AD is "CC=1, YY=1". Year
100 is "CC=1, YY=00", year 1000 is "CC=10, YY=00", year 2000 is "CC=20, YY=00"
(1900 is "CC=19, YY=00").
"Akio Iwaasa" <[EMAIL PROTECTED]> writes:
> When I've used "to_char" function to convert "Date" to
> "century" format text, '2000-01-01' was converted in
> the 21st century.
I've patched this in HEAD and 8.2 branch.
regards, tom lane
---(end of b
Douglas Toltzman <[EMAIL PROTECTED]> writes:
> Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
> With the OLAP option
> JServer Release 9.2.0.4.0 - Production
> select ordh_dtinral, to_char(ordh_dtinral,'CC YY') from ordheader
> where ordh_dtinral between '01-Jan-2000' and '01-M
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
With the OLAP option
JServer Release 9.2.0.4.0 - Production
select ordh_dtinral, to_char(ordh_dtinral,'CC YY') from ordheader
where ordh_dtinral between '01-Jan-2000' and '01-Mar-2000';
ORDH_DTIN TO_CH
- -
Bruce Momjian <[EMAIL PROTECTED]> writes:
> I updated our documentation for CC:
> century component of year (minimum 2 digits)
Updating the documentation isn't a solution; either the code is correct
or it's not, and I rather suspect it's not (it's incompatible with
EXTRACT(CENTURY) for exa
I updated our documentation for CC:
century component of year (minimum 2 digits)
---
Tom Lane wrote:
> "Akio Iwaasa" <[EMAIL PROTECTED]> writes:
> > When I've used "to_char" function to convert "Date" to
> > "cent
"Akio Iwaasa" <[EMAIL PROTECTED]> writes:
> When I've used "to_char" function to convert "Date" to
> "century" format text, '2000-01-01' was converted in
> the 21st century.
> postgres=# select to_char('2000-01-01'::date, 'CC') ;
> to_char
> -
> 21
> (1 row)
I'm not entirely sure
The following bug has been logged online:
Bug reference: 2885
Logged by: Akio Iwaasa
Email address: [EMAIL PROTECTED]
PostgreSQL version: 8.2.1
Operating system: Redhat EL ES 3.0
Description:to_char function
Details:
When I've used "to_char" function to convert "Dat