Date format problem with INSERT statement.

Поиск
Список
Период
Сортировка
От Olav Gjerde
Тема Date format problem with INSERT statement.
Дата
Msg-id 20060413143814.60372.qmail@web86913.mail.ukl.yahoo.com
обсуждение исходный текст
Ответы Re: Date format problem with INSERT statement.  ("Xavier Poinsard" <xpoinsard@free.fr>)
Список pgsql-jdbc
If I do an:

INSERT INTO wdata (date)
VALUES ('13.04.06');

From the Query Tool in PGAdmin it will insert the dd.mm.yy format correctly without problems.


But when I do this in Java I get this error message

SQLException: ERROR: date/time field value out of range: "13.04.06"
SQLState:    22008
VendorError:  0

This is because it reads the date format as mm.dd.yy because when I insert with the value '12.04.06' it works perfect. I've changed the datestyle in my Database to European but it still doesn't work. Do the JDBC driver only insert dates in the US format?

Olav

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

Предыдущее
От: "Harald Armin Massa"
Дата:
Сообщение: Re: [GENERAL] browser shows garbage instead of UTF-8 characters
Следующее
От: "Xavier Poinsard"
Дата:
Сообщение: Re: Date format problem with INSERT statement.