Обсуждение: epoch to date?

Поиск
Список
Период
Сортировка

epoch to date?

От
Alex Rice
Дата:
I have a column with seconds since the unix epoch. How to convert it to 
date? Sorry I couldn't find it in the docs.

Alex Rice, Software Developer
Architectural Research Consultants, Inc.
alrice@ARCplanning.com
alrice@swcp.com



Re: epoch to date?

От
Bruno Wolff III
Дата:
On Thu, May 08, 2003 at 13:44:22 -0600, Alex Rice <alrice@ARCplanning.com> wrote:
> I have a column with seconds since the unix epoch. How to convert it to 
> date? Sorry I couldn't find it in the docs.

One way is:
select 'epoch'::timestamp + 1234 * '1 second'::interval;

Another is:
select 1234::abstime;