Forum OpenACS Q&A: Response to to_date convertion in PostgreSQL

Collapse
Posted by Vinod Kurup on
I think the docs mean that postgres expects to be sent a 'month name' that has already been blank-padded to be 9 chars long.

So, if you pad the month before sending it to pg, it works:

  openacs4=# select to_date('2001-January  -12'::varchar, 'YYYY-Month-DD'::varchar);    to_date  ------------   2001-01-12 

Although, I agree that I would have expected pg to handle your version (and Oracle does).