| From: | "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com> |
|---|---|
| To: | pgsql-sql(at)postgresql(dot)org |
| Subject: | Re: converting epoch to timestamp |
| Date: | 2005-10-26 09:25:16 |
| Message-ID: | 20051026092516.GA27264@webserv.wug-glas.de |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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 ===
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Stef | 2005-10-26 09:31:42 | Re: converting epoch to timestamp |
| Previous Message | Richard Huxton | 2005-10-26 09:22:25 | Re: converting epoch to timestamp |