Skip site navigation (1) Skip section navigation (2)

Re: converting unix seconds to timestamp

From: Alexei Chetroi <lexoid(at)lexa(dot)uniflux-line(dot)net>
To:
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: converting unix seconds to timestamp
Date: 2004-04-23 10:17:16
Message-ID: 20040423101716.GA1263@uniflux-line.net (view raw or flat)
Thread:
Lists: pgsql-sql
On Fri, Apr 23, 2004 at 11:46:52AM +0300, Alexei Chetroi wrote:
> Date: Fri, 23 Apr 2004 11:46:52 +0300
> From: Alexei Chetroi <lexoid(at)lexa(dot)uniflux-line(dot)net>
> User-Agent: Mutt/1.5.5.1+cvs20040105i
> To: pgsql-sql(at)postgresql(dot)org
> Subject: [SQL] converting unix seconds to timestamp
> 
> 
>  Hi,
> 
>  I wish to convert unix seconds which are from 1970 to timestamp and connot
> find appropriate function for it. I know how to convert timestamp to unix
> second with extract(epoch FROM ...) but not reverse. 

  Sorry, already found answer to my question:
  SELECT TIMESTAMP WITH TIMEZONE 'epoch' + 1082709745 * interval '1 second';

  Thanks

--
Alexei Chetroi

In response to

pgsql-sql by date

Next:From: Tom LaneDate: 2004-04-23 12:01:31
Subject: Re: Server Side C programming Environment Set up
Previous:From: Peter EisentrautDate: 2004-04-23 10:03:01
Subject: Re: Record Lock details

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group