Received: from phaedrus.gaslightmedia.com (phaedrus.gaslightmedia.com [208.171.24.70]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f42KN6A69048 for ; Wed, 2 May 2001 16:23:06 -0400 (EDT) (envelope-from muk@phaedrus.gaslightmedia.com) Received: (from muk@localhost) by phaedrus.gaslightmedia.com (8.11.3/8.11.3) id f42KN2B54303 for pgsql-php@postgresql.org; Wed, 2 May 2001 16:23:02 -0400 (EDT) (envelope-from muk) Date: Wed, 2 May 2001 16:23:02 -0400 From: Matthew Kolb To: pgsql-php@postgresql.org Subject: Re: Unixtime function?... Message-ID: <20010502162301.A54232@phaedrus.gaslightmedia.com> Reply-To: "m. kolb" Mail-Followup-To: Matthew Kolb , pgsql-php@postgresql.org References: <5.0.2.1.0.20010502084535.0413d790@mekong.connections.yk.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <5.0.2.1.0.20010502084535.0413d790@mekong.connections.yk.ca>; from richard@connections.yk.ca on Wed, May 02, 2001 at 08:49:32AM -0700 X-Archive-Number: 200105/5 X-Sequence-Number: 314 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@phaedrus.gaslightmedia.com