From: Ravi Krishna <sr_kris...@aol.com>

> postgres=# select to_date('2018150X','YYYYMMDD');
  > to_date
------------
> 2019-03-03


> postgres=# select to_date('20181501','YYYYMMDD');
>  to_date
> ------------
  > 2019-03-03

is this a cut-n-paste mistake?

====================
Surprisingly (to me), no….
db=# select to_date('20181501','YYYYMMDD');
  to_date
------------
2019-03-03
(1 row)

Time: 0.497 ms
nms=# select version();
                                                 version
----------------------------------------------------------------------------------------------------------
PostgreSQL 9.6.5 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.4.7 20120313 
(Red Hat 4.4.7-16), 64-bit
(1 row)

Time: 0.247 ms
db=#



This e-mail transmission, and any documents, files or previous e-mail messages 
attached to it, may contain confidential information. If you are not the 
intended recipient, or a person responsible for delivering it to the intended 
recipient, you are hereby notified that any disclosure, distribution, review, 
copy or use of any of the information contained in or attached to this message 
is STRICTLY PROHIBITED. If you have received this transmission in error, please 
immediately notify us by reply e-mail, and destroy the original transmission 
and its attachments without reading them or saving them to disk. Thank you.

Reply via email to