Re: converting epoch to timestamp - Mailing list pgsql-sql

From A. Kretschmer
Subject Re: converting epoch to timestamp
Date
Msg-id 20051026092516.GA27264@webserv.wug-glas.de
Whole thread Raw
In response to converting epoch to timestamp  (Rajesh Kumar Mallah <mallah.rajesh@gmail.com>)
List pgsql-sql
am  26.10.2005, um 14:35:51 +0530 mailte Rajesh Kumar Mallah folgendes:
> Hi,
> 
> Can anyone tell me how to convert epoch to timestamp ?
> 
> ie reverse of :
> 
> SELECT EXTRACT( epoch FROM  now() );
> +------------------+
> |    date_part     |
> +------------------+
> | 1130317518.61997 |
> +------------------+
> (1 row)

SELECT TIMESTAMP WITH TIME ZONE 'epoch' + 1130317518.61997 * INTERVAL '1 second';

HTH, Andreas
-- 
Andreas Kretschmer    (Kontakt: siehe Header)
Heynitz:  035242/47212,      D1: 0160/7141639
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net===    Schollglas Unternehmensgruppe    === 


pgsql-sql by date:

Previous
From: Rajesh Kumar Mallah
Date:
Subject: converting epoch to timestamp
Next
From: Richard Huxton
Date:
Subject: Re: converting epoch to timestamp