On Thu, 1 Apr 2004, [ISO-8859-1] Jo�o Paulo F. Diniz wrote:
> Hi,
>
> I'm using a java program to connect to a postgresql database (I'm using
> postgresql version 7.2.1).
> I'd like to retrieve a value of type DATE with ResultSet.getString()
> method
> in the format dd/mm/yyyy without make any more changes in the program.
>
> I've already tried to Change PGDATESTYLE to "sql, european".
You cannot change the datestyle as the JDBC driver resets it to iso format
on connection start. This simplifies the driver's life as it only needs
to know how to parse one date format. If you want to format a date you
should be looking at getDate() and using java.text.DateFormat to make it
come out as you want instead of getString().
Kris Jurka