Re: Function to convert from (integer) UNIXTIME to DATETIME - Mailing list pgsql-general

From Thomas Lockhart
Subject Re: Function to convert from (integer) UNIXTIME to DATETIME
Date
Msg-id 395803C9.4F024116@alumni.caltech.edu
Whole thread Raw
In response to Function to convert from (integer) UNIXTIME to DATETIME  ("Morten W. Petersen" <morten@src.no>)
List pgsql-general
> You can cast an integer representing Unix timestamp directly to
> abstime...

Or directly to timestamp (which may pass through abstime on the way):

lockhart=# select timestamp(962057134);
         timestamp
---------------------------
 2000-06-26 22:05:34.00+00
(1 row)

Probably works for 6.5.x too.

                    - Thomas

pgsql-general by date:

Previous
From: Richard Harvey Chapman
Date:
Subject: Inserting all defaults
Next
From: Thomas Lockhart
Date:
Subject: Re: Conversion from MS Access to Postgresql