Forum OpenACS Q&A: Response to Postgres to_date bug?

Collapse
Posted by Leif Jensen on
It is actually not the dashes, but the 0 (zeros):

testdb=# select to_date('2001-3-6 10:00', 'YYYY-FMMM-FMDD HH24:MI');
  to_date
------------
2001-03-06
(1 row)

testdb=# select to_date('2001-12-16 10:00', 'YYYY-FMMM-FMDD HH24:MI');
  to_date
------------
2001-12-16
(1 row)