Re: Timestamp Question

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема Re: Timestamp Question
Дата
Msg-id 40F1E038.20609@opencloud.com
обсуждение исходный текст
Ответ на Re: Timestamp Question  ("Dario V. Fassi" <software@sistemat.com.ar>)
Список pgsql-jdbc
Dario V. Fassi wrote:

> You are seeing it:
>
>  > test=> select '2004-07-10 12:59:59.123'::timestamp(6);
>  >        timestamp        -------------------------
>  > 2004-07-10 12:59:59.123
>
> I suggest that is cross DBs (eg.  DB2 / PgSql etc) ,  the above
> situation cause troubles.

Sounds like it's not a JDBC problem though -- perhaps you should take it
up on pgsql-general or pgsql-sql?

> ** From a Jdbc client can see rows like:
>     2004-07-10 12:59:59.123
>
> in plase of:
>
>     2004-07-10 12:59:59.12300
> or
>     2004-07-10 12:59:59.00123

If you're using JDBC, you should be using ResultSet.getTimestamp(), not
interpreting the strings directly. Do you have a testcase that uses
getTimestamp() and sees an incorrect value?

-O

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

Предыдущее
От: "Dario V. Fassi"
Дата:
Сообщение: Re: Timestamp Question
Следующее
От: Kris Jurka
Дата:
Сообщение: Re: JDBC Connection