Re: Problem with to_date function

Поиск
Список
Период
Сортировка
Искать
От
Kris Jurka
Тема
Re: Problem with to_date function
Дата
Msg-id
Pine.BSO.4.62.0508221511580.26056@leary.csoft.net
Ответ на
Problem with to_date function (Gilberto C Andrade)
Список
Дерево обсуждения
Problem with to_date function Gilberto C Andrade <gilbertoca@secad.to.gov.br>
Re: Problem with to_date function Jan de Visser <jdevisser@digitalfairway.com>
Re: Problem with to_date function Kris Jurka <books@ejurka.com>


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
В списке pgsql-jdbc по дате отправления
От: Jan de Visser
Дата:
От: Kris Jurka
Дата:
FAQ