X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 892CF56A79 for ; Fri, 18 Mar 2005 02:14:35 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 59582-03 for ; Fri, 18 Mar 2005 02:14:34 +0000 (GMT) Received: from laughter.local (unknown [61.197.227.146]) by svr1.postgresql.org (Postfix) with ESMTP id 5BD1856A72 for ; Fri, 18 Mar 2005 02:14:33 +0000 (GMT) Received: from [127.0.0.1] (localhost [127.0.0.1]) by laughter.local (Postfix) with ESMTP id 5336D4DCE44; Fri, 18 Mar 2005 11:14:36 +0900 (JST) In-Reply-To: <423A4F9A.6090509@sbcglobal.net> References: <423A4F9A.6090509@sbcglobal.net> Mime-Version: 1.0 (Apple Message framework v619.2) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <33994323d1c711b8d62305747d4eab40@myrealbox.com> Content-Transfer-Encoding: 7bit Cc: enzovenegas@mixmail.com, "pgsql-php@postgresql.org" From: Michael Glaesemann Subject: Re: a new question Date: Fri, 18 Mar 2005 11:14:35 +0900 To: Todd Lewis X-Mailer: Apple Mail (2.619.2) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/48 X-Sequence-Number: 3063 > enzo venegas palacios wrote: > >> hi, my problem is very basic (and my english too) >> >> i have a variable with a date (timestamp format) >> $fecha = mm-dd-yyy hh:mm:ss >> >> i need to display only the date and not the hour >> >> $only_date = ??? ($fecha); >> >> echo $only_date; >> display = mm-dd-aaaa On Mar 18, 2005, at 12:48, Todd Lewis wrote: > you can use to_char(timestamp,'mm-dd-yyy') where timestamp is your > couln name. You can place this in your select section. > Or you can use extract('epoch' from yourtimestamp) to return an UNIX timestamp to PHP, and then use PHP's date formating functions. Michael Glaesemann grzm myrealbox com