pg.ddx.io pgsql-php@postgresql.org mailing list archive
help / color / mirror / Atom feeda new question
4+ messages / 4 participants
[nested] [flat]
* a new question
@ 2005-03-17 23:35 enzo venegas palacios <enzovenegas@mixmail.com>
2005-03-18 03:48 ` Re: a new question Todd Lewis <lewis-todd@sbcglobal.net>
2005-03-18 22:07 ` Re: a new question Bastiaan Wakkie <bastiaan@wakkie.org>
0 siblings, 2 replies; 4+ messages in thread
From: enzo venegas palacios @ 2005-03-17 23:35 UTC (permalink / raw)
To: pgsql-php
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/
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: a new question
2005-03-17 23:35 a new question enzo venegas palacios <enzovenegas@mixmail.com>
@ 2005-03-18 03:48 ` Todd Lewis <lewis-todd@sbcglobal.net>
2005-03-18 02:14 ` Re: a new question Michael Glaesemann <grzm@myrealbox.com>
1 sibling, 1 reply; 4+ messages in thread
From: Todd Lewis @ 2005-03-18 03:48 UTC (permalink / raw)
To: enzovenegas@mixmail.com; +Cc: pgsql-php
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
>
>
>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: a new question
2005-03-17 23:35 a new question enzo venegas palacios <enzovenegas@mixmail.com>
2005-03-18 03:48 ` Re: a new question Todd Lewis <lewis-todd@sbcglobal.net>
@ 2005-03-18 02:14 ` Michael Glaesemann <grzm@myrealbox.com>
0 siblings, 0 replies; 4+ messages in thread
From: Michael Glaesemann @ 2005-03-18 02:14 UTC (permalink / raw)
To: Todd Lewis <lewis-todd@sbcglobal.net>; +Cc: 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
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: a new question
2005-03-17 23:35 a new question enzo venegas palacios <enzovenegas@mixmail.com>
@ 2005-03-18 22:07 ` Bastiaan Wakkie <bastiaan@wakkie.org>
1 sibling, 0 replies; 4+ messages in thread
From: Bastiaan Wakkie @ 2005-03-18 22:07 UTC (permalink / raw)
To: pgsql-php
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
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2005-03-18 22:07 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-03-17 23:35 a new question enzo venegas palacios <enzovenegas@mixmail.com>
2005-03-18 03:48 ` Todd Lewis <lewis-todd@sbcglobal.net>
2005-03-18 02:14 ` Michael Glaesemann <grzm@myrealbox.com>
2005-03-18 22:07 ` Bastiaan Wakkie <bastiaan@wakkie.org>
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