pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alexei Chetroi <lexoid@lexa.uniflux-line.net>
Cc: pgsql-sql@postgresql.org
Subject: Re: converting unix seconds to timestamp
Date: Fri, 23 Apr 2004 13:17:16 +0300
Message-ID: <20040423101716.GA1263@uniflux-line.net> (raw)
In-Reply-To: <20040423084651.GA1207@uniflux-line.net>
References: <20040423084651.GA1207@uniflux-line.net>

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@lexa.uniflux-line.net>
> User-Agent: Mutt/1.5.5.1+cvs20040105i
> To: pgsql-sql@postgresql.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



view thread (2+ messages)

Message-ID: <20040423101716.GA1263@uniflux-line.net>
Permalink:  ../20040423101716.GA1263@uniflux-line.net/
Also on:    postgresql.org/message-id/20040423101716.GA1263@uniflux-line.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: lexoid@lexa.uniflux-line.net
  Subject: Re: converting unix seconds to timestamp
  In-Reply-To: <20040423101716.GA1263@uniflux-line.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox