| From: | Andre Maasikas <andre(at)abs(dot)ee> |
|---|---|
| To: | |
| Cc: | pgsql-bugs(at)postgresql(dot)org |
| Subject: | Re: CC Date format code defaults to current centry |
| Date: | 2005-03-14 11:11:58 |
| Message-ID: | 4235717E.5050304@abs.ee |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs pgsql-patches |
Bruce Momjian wrote:
> 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.
>
Yes, but the other way around: to_date('19450323','CCYYMMDD')
shoold be a year in the 19th century?
ps another db seems to disallow CC on input - maybe because one can
get into weird situations like to_date('2005 18','YYYY CC') or something
similar.
Andre
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ales Vojacek | 2005-03-14 11:55:09 | BUG #1543: Problem with restore DB |
| Previous Message | Andrew Slobodyanyk | 2005-03-14 10:46:07 | BUG #1542: pg_dump seg fault |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bruce Momjian | 2005-03-14 18:28:43 | Re: submitted WIN1252 patches are buggy |
| Previous Message | Simon Riggs | 2005-03-14 08:17:48 | Re: [GENERAL] A way to let Vacuum warn if FSM settings |