TO_DATE behavior! - Mailing list pgsql-hackers

From Gevik Babakhani
Subject TO_DATE behavior!
Date
Msg-id 008801c87472$fb72d600$0a01a8c0@gevmus
Whole thread Raw
Responses Re: TO_DATE behavior!  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
I would like to have your opinion about the following behavior of TO_DATE.
Is this correct or a hidden feature?

case:
'mon 21-feb-2008' is obviously a bad date. It should be 'thu 21-feb-2008'

test:
testdb=# select to_date('mon 21-feb-2008','dy dd-mon-yyyy'); to_date
------------2008-02-21
(1 row)

No complains there!(?)

The opposite query results the correct date.

test:
testdb=# select to_char(to_date('mon 21-feb-2008','dy dd-mon-yyyy'),'dy
dd-mon-yyyy');    to_char
-----------------thu 21-feb-2008
(1 row)


Regards,
Gevik 



pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: Permanent settings
Next
From: Peter Eisentraut
Date:
Subject: Re: TO_DATE behavior!