converting an epoch to a timestamp - Mailing list pgsql-sql

From Christopher Kings-Lynne
Subject converting an epoch to a timestamp
Date
Msg-id GNELIHDDFBOCMGBFGEFOMEBECBAA.chriskl@familyhealth.com.au
Whole thread Raw
Responses Re: converting an epoch to a timestamp
List pgsql-sql
How does one go about converting a UNIX epoch (ie. int4) to a timestamp?

These don't work:

("datetime" is the int4 field)

extract(timestamp from epoch datetime)
extract(timestamp from datetime)

I'm using 7.1.3, but am also interested in 7.2 solutions.  And if it isn't
part of extract, shouldn't it be?

Chris



pgsql-sql by date:

Previous
From: "Josh Berkus"
Date:
Subject: Re: problem with date and to_char
Next
From: Tom Lane
Date:
Subject: Re: converting an epoch to a timestamp