Re: Unixtime function?...

From: Matthew Kolb <muk(at)phaedrus(dot)gaslightmedia(dot)com>
To: pgsql-php(at)postgresql(dot)org
Subject: Re: Unixtime function?...
Date: 2001-05-02 20:23:02
Message-ID: 20010502162301.A54232@phaedrus.gaslightmedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

On Wed, May 02, 2001 at 08:49:32AM -0700, Richard Whittaker wrote:
> In MySQL there is a function to convert an arbitrary date/time combination
> to a Unix timestamp, which makes it really easy to perform calculations in
> PHP, since the result was always an integer... Is there a similar function
> out there for PostgresSQL or PHP?...

well in php you can use date(),
http://www.php.net/manual/en/function.date.php

and all the time functions in php
http://www.php.net/manual/en/ref.datetime.php

and in postgres you can use functions like date_part()
http://www.postgresql.org/docs/aw_pgsql_book/node92.html#7786

that would be a good start.

./muk

--
Matthew Kolb
muk(at)phaedrus(dot)gaslightmedia(dot)com

In response to

Browse pgsql-php by date

  From Date Subject
Next Message Roberto Mello 2001-05-02 20:44:04 Re: Unixtime function?...
Previous Message Richard Whittaker 2001-05-02 20:20:24 Re: Unixtime function?...