Re: problems with datestyle

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: problems with datestyle
Дата
Msg-id Pine.BSO.4.56.0404011711160.4684@leary.csoft.net
обсуждение исходный текст
Ответ на problems with datestyle  (João Paulo F. Diniz <jpaulo@dcc.ufmg.br>)
Список pgsql-jdbc

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


В списке pgsql-jdbc по дате отправления:

Предыдущее
От: João Paulo F. Diniz
Дата:
Сообщение: problems with datestyle
Следующее
От: Kris Jurka
Дата:
Сообщение: Re: disabling seq scans