select date_part('epoch', timestamp(topics.date_added)) from table;
On Thu, 22 Mar 2001, Richie wrote:
> Hi
>
> I have a field of type timestamp in my database but when I retrieve it I
> want to convert it to its unix timetamp value because I need to compare 2
> tables by their timestamp value.
>
> Any ideas how to convert PostgreSQL timestamp to Unix timestamp???
>
> Thanks
>
> Richie
>
> =========================================================
> Richie Duggan
> Computer Science IV
> University College Cork
> Eamil : dugganr@student.cs.ucc.ie richie_dug@yahoo.com
> Homepage : http://student.cs.ucc.ie/01/dugganr/index.html
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster