Problem with to_date function

From: Gilberto C Andrade <gilbertoca(at)secad(dot)to(dot)gov(dot)br>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Problem with to_date function
Date: 2005-08-22 19:31:51
Message-ID: 430A2827.9060907@secad.to.gov.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hi,

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)

from my jdbc code:
rs = stmt.executeQuery("select to_date(current_date,
'DD/MM/YYYY'), current_date");
while (rs.next()) {
System.out.println(rs.getString(1) + " | "
+rs.getString(2));
}
result:
0028-01-26 | 2005-08-22

Any advice here?
Thanks!
Gilberto

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2005-08-22 20:15:45 Re: Problem with to_date function
Previous Message Prasanth 2005-08-22 15:02:13 Re: Bad value for type date