Re: Convert Timestamp to Date?

Поиск
Список
Период
Сортировка
От Barry Lind
Тема Re: Convert Timestamp to Date?
Дата
Msg-id 3BE7709F.4090801@xythos.com
обсуждение исходный текст
Ответ на Convert Timestamp to Date?  ("Dr. Evil" <drevil@sidereal.kz>)
Список pgsql-jdbc
There is not need to convert these two datatypes.  Timestamp is a
subclass of Date.  Thus in the OO sense a Timestamp object is a Date
object.  You can just cast a Timestamp object to a Date.

thanks,
--Barry

Dr. Evil wrote:

> Hi, is there a way to convert java.sql.Timestamp to java.util.Date
> type?  It seems like there should be because Timestamp is basically a
> wrapper for Date, but there doesn't seem to be any method to do this.
> I could have Timestamp output a string and then have Date parse the
> string, but that seems very inefficient.
>
> Thanks
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>
>



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

Предыдущее
От: Liam Stewart
Дата:
Сообщение: Re: Funny timezone shift causes failure in test suite
Следующее
От: Barry Lind
Дата:
Сообщение: Re: Backend Protocol