Re: to_date/to timestamp going to BC - Mailing list pgsql-sql

From Tom Lane
Subject Re: to_date/to timestamp going to BC
Date
Msg-id 11453.1002143642@sss.pgh.pa.us
Whole thread Raw
In response to to_date/to timestamp going to BC  (jason.servetar@ccgenesis.com)
Responses Re: to_date/to timestamp going to BC  (Karel Zak <zakkr@zf.jcu.cz>)
List pgsql-sql
jason.servetar@ccgenesis.com writes:
> Can someone tell me if this is a bug with the date functions or am I using
> them incorrectly?

I get the right thing when I use the right format:

regression=# select dt, to_timestamp(dt, 'FMMonth dd, yyyy') from test_date;      dt       |      to_timestamp
----------------+------------------------March 11, 1997 | 1997-03-11 00:00:00-05
(1 row)

However, I'd agree that this shows a lack of robustness in to_timestamp;
it's not objecting to data that doesn't match the format.
        regards, tom lane


pgsql-sql by date:

Previous
From: jason.servetar@ccgenesis.com
Date:
Subject: to_date/to timestamp going to BC
Next
From: jason.servetar@ccgenesis.com
Date:
Subject: Re: to_date/to timestamp going to BC