Search Postgresql Archives

RE: Re: date function bug

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

 



20181501 is illegal. Working OK.

ctrlmdb=> select to_date('20181501','YYYYMMDD')

ctrlmdb-> \g

ERROR:  date/time field value out of range: "20181501"

 

From: Ravi Krishna <sr_krishna@xxxxxxx>
Sent: Wednesday, October 23, 2019 5:28 PM
To: Abraham, Danny <danny_abraham@xxxxxxx>; pgsql-general@xxxxxxxxxxxxxx
Subject: [EXTERNAL] Re: date function bug

 

> ctrlmdb=> select to_date('2018100X','YYYYMMDD');

> to_date

------------

>2018-10-01

>(1 row)

 

I am able to reproduce this in 11.5 It seems PG can take a single digit for Day too.

 

select to_date('2018109','YYYYMMDD') produces 2018-10-09.


[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 Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux