Re: Converting POSTGRESQL timestamp to UNIX timestamp

From: Grant <grant(at)conprojan(dot)com(dot)au>
To: Richie <dugganr(at)student(dot)cs(dot)ucc(dot)ie>
Cc: pgsql-php(at)postgresql(dot)org
Subject: Re: Converting POSTGRESQL timestamp to UNIX timestamp
Date: 2001-03-26 00:11:46
Message-ID: Pine.LNX.4.21.0103261011080.29634-100000@webster.conprojan.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

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(at)student(dot)cs(dot)ucc(dot)ie richie_dug(at)yahoo(dot)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(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>

In response to

Browse pgsql-php by date

  From Date Subject
Next Message Grant 2001-03-26 00:13:25 Re: Refreshing php page every 5 secs WHILE SAVING INFORMATION
Previous Message Paul Joseph McGee 2001-03-25 16:01:10 Input Forms