Search Postgresql Archives

Re: to_date() and to_timestamp() with negative years

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/3/21 17:00, Adrian Klaver wrote:
On 11/3/21 15:56, Bryn Llewellyn wrote:
tgl@xxxxxxxxxxxxx wrote:


And you have to have some kind of separator between the years substring and the adjacent one(s) even to succeed with years that have more than four digits. Another usage note stresses that while this is OK:

select to_date('12340101', 'YYYYMMDD');

this isn't:

select to_date('123450101', 'YYYYMMDD');

It does with a tweak:

select to_date('12345 0101', 'FMYYYYMMDD');
    to_date
-------------
  12345-01-01

Well that was just plain wrong. I was not paying attention.



--
Adrian Klaver
adrian.klaver@xxxxxxxxxxx





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux