| From: | "Abraham, Danny" <danny_abraham(at)bmc(dot)com> | 
|---|---|
| To: | Ravi Krishna <sr_krishna(at)aol(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> | 
| Cc: | "Abraham, Danny" <danny_abraham(at)bmc(dot)com> | 
| Subject: | RE: Re: date function bug | 
| Date: | 2019-10-23 14:41:44 | 
| Message-ID: | 948520b28c3245d8ba4f0c622a50a851@phx-exmbprd-01.adprod.bmc.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-general | 
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(at)aol(dot)com>
Sent: Wednesday, October 23, 2019 5:28 PM
To: Abraham, Danny <danny_abraham(at)bmc(dot)com>; pgsql-general(at)postgresql(dot)org
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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ron | 2019-10-23 14:43:28 | Re: date function bug | 
| Previous Message | Ravi Krishna | 2019-10-23 14:32:30 | Re: date function bug |