From: | Michael Glaesemann <grzm(at)myrealbox(dot)com> |
---|---|
To: | Todd Lewis <lewis-todd(at)sbcglobal(dot)net> |
Cc: | enzovenegas(at)mixmail(dot)com, "pgsql-php(at)postgresql(dot)org" <pgsql-php(at)postgresql(dot)org> |
Subject: | Re: a new question |
Date: | 2005-03-18 02:14:35 |
Message-ID: | 33994323d1c711b8d62305747d4eab40@myrealbox.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-php |
> 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
From | Date | Subject | |
---|---|---|---|
Next Message | Todd Lewis | 2005-03-18 03:48:42 | Re: a new question |
Previous Message | enzo venegas palacios | 2005-03-17 23:35:30 | a new question |