bsreejithin <[email protected]> writes:
> I am not sure why : select to_date('33-OCT-2013', 'dd-mon-yyyy')
> is returning 2013-11-02.
> For cases like the issue I am facing, where we need to raise an error saying
> the data is wrong, DB manipulating the data is not proper.
Then don't use to_date(). Just entering the string through the normal date
type input function will do what you want. to_date() is meant for trying
to extract data from weird input formats.
regards, tom lane
--
Sent via pgsql-general mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general