Re: convert from epoch to timestamp

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: convert from epoch to timestamp
Дата
Msg-id 20050509210136.GA10972@wolff.to
обсуждение исходный текст
Ответ на convert from epoch to timestamp  ("Celia McInnis" <celia@drmath.ca>)
Список pgsql-novice
On Fri, May 06, 2005 at 19:39:26 -0500,
  Celia McInnis <celia@drmath.ca> wrote:
> This time I'll give an appropriate subject...

Please don't reply to existing threads to start a new one, even if you change
the subject.

> How to I convert from EPOCH time to a "TIMESTAMP WTHOUT TIME ZONE" type?

The simplest is probably:
select 1::abstime at time zone 'UTC';
Where you replace '1' by whatever number has the integer number of seconds
since the epoch. If you need fractional seconds then you need to multiply
the number seonds times and interval of 1 second and add it to the
the start of the epoch.

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

Предыдущее
От: William Yu
Дата:
Сообщение: Re: downloading files- more details
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: returned row number