Thread: epoch to date?

epoch to date?

From
Alex Rice
Date:
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?

From
Bruno Wolff III
Date:
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;