Re: Problem with datestyle and driver jdbc

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: Problem with datestyle and driver jdbc
Дата
Msg-id Pine.BSO.4.56.0506301527300.7073@leary.csoft.net
обсуждение исходный текст
Ответ на Problem with datestyle and driver jdbc  ("Alberto Molteni" <albert82@tiscali.it>)
Список pgsql-jdbc

On Thu, 30 Jun 2005, Alberto Molteni wrote:

> today I subscribed to this mailing list. I hope someone can help me with
> my problem.
>
> When I try to set the datestyle of the driver
>
> org.postgresql.util.PSQLException: The server's DateStyle parameter was
> changed to SQL, DMY. The JDBC driver requires DateStyle to begin with
> ISO for correct operation.
>
> How can I change the code to have the date format as it is in the db
> (that is DD/MM/YYYY HH:MM:SS) and not as YYYY/MM/DD?
>

You should do any formatting you need by retrieving a java Date or
Timestamp object and using a java.text.SimpleDateFormat to turn it into
the text representation you desire.

Kris Jurka

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

Предыдущее
От: peter royal
Дата:
Сообщение: Re: XA support
Следующее
От: Oliver Jowett
Дата:
Сообщение: Re: XA support