From: Michael Glaesemann <grzm@myrealbox.com>
To: Todd Lewis <lewis-todd@sbcglobal.net>
Cc: enzovenegas@mixmail.com, "pgsql-php@postgresql.org" <pgsql-php@postgresql.org>
Subject: Re: a new question
Date: Fri, 18 Mar 2005 11:14:35 +0900
Message-ID: <33994323d1c711b8d62305747d4eab40@myrealbox.com> (raw)
In-Reply-To: <423A4F9A.6090509@sbcglobal.net>
References: <E1DC4WY-0001As-00@relay.mixmail.com>
<423A4F9A.6090509@sbcglobal.net>
> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: grzm@myrealbox.com, lewis-todd@sbcglobal.net
Subject: Re: a new question
In-Reply-To: <33994323d1c711b8d62305747d4eab40@myrealbox.com>
References: <E1DC4WY-0001As-00@relay.mixmail.com> <423A4F9A.6090509@sbcglobal.net> <33994323d1c711b8d62305747d4eab40@myrealbox.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox