On Mon, 22 Aug 2005, Gilberto C Andrade wrote:
> I would like to know if the following is the expected result:
> from psql:
> bcoproducao=# select to_date(current_date, 'DD/MM/YYYY'), current_date;
> to_date | date
> ------------+------------
> 22/08/2005 | 22/08/2005
> (1 row)
>
This query depends on the setting of the DateStyle parameter which
determines how current_date is turned into text before being passed into
to_date. The JDBC driver sets DateStyle to ISO on connection startup so
that it can send and receive dates in this format. Unfortunately it seems
to_date doesn't error out with "improper date format" or similar, but just
tries to make a best guess at what you really wanted.
Kris Jurka