Re: CC Date format code defaults to current centry

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Joe Brown <joebrown(at)rclooke(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: CC Date format code defaults to current centry
Date: 2005-03-14 02:24:33
Message-ID: 200503140224.j2E2OXC14497@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-patches

Joe Brown wrote:
> joe=> select to_date('19450323','CCYYMMDD');
> to_date
> ------------
> 2045-03-23
> (1 row)
>
> joe=> select to_date('19450323','YYYYMMDD');
> to_date
> ------------
> 1945-03-23
> (1 row)
>
> I thought the former would be "more" correct. But it seems I am mistaken.

Uh, 1945 _is_ in the 20th century, but I can see how it is confusing.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Neil Conway 2005-03-14 03:00:41 Re: BUG #1540: Enhancement request: 'ambiguous' column reference
Previous Message Qingqing Zhou 2005-03-14 02:23:00 random FlushRelationBuffers() failed on Pg8.0.1 Win32

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2005-03-14 02:52:19 Re: [PATCHES] A way to let Vacuum warn if FSM settings are low. [final?]
Previous Message Neil Conway 2005-03-14 00:20:26 Re: ALTER FUNCTION / STRICT