From: | "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: date/time function |
Date: | 2005-12-01 09:17:49 |
Message-ID: | 20051201091749.GG25616@webserv.wug-glas.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
am 01.12.2005, um 11:07:59 +0200 mailte Sterpu Victor folgendes:
> I need a function that will transform from the format '2002-09-08 05:29:41'
> to seconds since 1970.
scholl=# select now();
now
-------------------------------
2005-12-01 10:18:47.554236+01
(1 row)
scholl=# select extract (epoch from now());
date_part
------------------
1133428728.47011
(1 row)
scholl=# select extract (epoch from now())::int;
date_part
------------
1133428743
(1 row)
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 | Terry Lee Tucker | 2005-12-01 09:21:59 | Re: date/time function |
Previous Message | Sterpu Victor | 2005-12-01 09:07:59 | date/time function |