SELECT EXTRACT(EPOCH FROM TIMESTAMP '2001-02-16 20:38:40');
-- and you can replace the timestamp string with the name of a timestamp
column.
The above is in the manual, BTW.
-Mitch
----- Original Message -----
From: "Edwin Grubbs" <egrubbs@rackspace.com>
To: <pgsql-general@postgresql.org>
Sent: Tuesday, June 26, 2001 11:16 AM
Subject: [GENERAL] timestamp to int
> Is there any function for converting a timestamp into an integer with the
> unix seconds value? It's really easy to convert in the other direction.
>
> -Edwin
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>