Re: Trouble with UNIX TimeStamps

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: Trouble with UNIX TimeStamps
Дата
Msg-id 20021227143807.GB3274@wolff.to
обсуждение исходный текст
Ответ на Trouble with UNIX TimeStamps  ("Jonathan Chum" <jchum@aismedia.com>)
Ответы Re: Trouble with UNIX TimeStamps  ("Jonathan Chum" <jchum@aismedia.com>)
Список pgsql-general
On Fri, Dec 27, 2002 at 08:49:58 -0500,
  Jonathan Chum <jchum@aismedia.com> wrote:
>
> The table column, ticket_starters.ticket_time_start is an INT type which
> contains a UNIX timestamp. I did not see anywhere in the Interactive docs
> how'd I convert the UNIX timestamp into a timestamp type so I can extract
> the day name. I'd rather not use PostGreSQL's timestamp types and just
> convert the database over to it since much of the programming utilizes the
> UNIX timestamp.  Any ideas?

One way to do this is:
area=> select to_char('epoch'::timestamp + (1040999196 || ' seconds')::interval,'Day');
  to_char
-----------
 Friday
(1 row)

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

Предыдущее
От: "Jonathan Chum"
Дата:
Сообщение: Trouble with UNIX TimeStamps
Следующее
От: "Jonathan Chum"
Дата:
Сообщение: Re: Trouble with UNIX TimeStamps