a new question

Поиск
Список
Период
Сортировка
Искать

a new question

От:
"enzo venegas palacios" <enzovenegas@mixmail.com>
Дата:

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


enzo
---------------------------------------------------------
Redecora tu m�vil. Redecora tu vida. �Por qu� no? Con http://logos.ya.com es posible
ADSL + Llamadas 24 horas: desde 28,95 �/mes + IVA. Navega y habla de forma ilimitada. Sin compromiso de permanencia. http://acceso.ya.com/ADSLllamadas/

Re: a new question

От:
Todd Lewis <lewis-todd@sbcglobal.net>
Дата:
you can use to_char(timestamp,'mm-dd-yyy') where timestamp is your couln 
name. You can place this in your select section.

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
>
>
>enzo
>---------------------------------------------------------
>Redecora tu móvil. Redecora tu vida. ¿Por qué no? Con http://logos.ya.com es posible
>ADSL + Llamadas 24 horas: desde 28,95 €/mes + IVA. Navega y habla de forma ilimitada. Sin compromiso de permanencia. http://acceso.ya.com/ADSLllamadas/
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 7: don't forget to increase your free space map settings
>
>  
>

Re: a new question

От:
Michael Glaesemann <grzm@myrealbox.com>
Дата:

> 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

Re: a new question

От:
Bastiaan Wakkie <bastiaan@wakkie.org>
Дата:
Hi enzo,

In your select statement you do this:
SELECT date_part('MONTH',date) as month, date_part('DAY',date) as day,
date_part('YEAR',date) as year
...

then in php the following:
displayDate = month."-".day."-".year

Cheers,
-- 
^(B(astia{2}n)?)(\s)?(W(ak{2}ie)?)$

On Thu, 2005-03-17 at 18:35 -0500, 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
> 
> 
> enzo
> ---------------------------------------------------------
> Redecora tu móvil. Redecora tu vida. ¿Por qué no? Con http://logos.ya.com es posible
> ADSL + Llamadas 24 horas: desde 28,95 €/mes + IVA. Navega y habla de forma ilimitada. Sin compromiso de permanencia. http://acceso.ya.com/ADSLllamadas/
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings


FAQ