pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bastiaan Wakkie <bastiaan@wakkie.org>
To: pgsql-php@postgresql.org
Subject: Re: a new question
Date: Fri, 18 Mar 2005 23:07:06 +0100
Message-ID: <1111183626.22520.5.camel@wakkie.org> (raw)
In-Reply-To: <E1DC4WY-0001As-00@relay.mixmail.com>
References: <E1DC4WY-0001As-00@relay.mixmail.com>

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





view thread (4+ messages)

Message-ID: <1111183626.22520.5.camel@wakkie.org>
Permalink:  ../1111183626.22520.5.camel@wakkie.org/
Also on:    postgresql.org/message-id/1111183626.22520.5.camel@wakkie.org

 · 

reply

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: bastiaan@wakkie.org
  Subject: Re: a new question
  In-Reply-To: <1111183626.22520.5.camel@wakkie.org>
  References: <E1DC4WY-0001As-00@relay.mixmail.com> <1111183626.22520.5.camel@wakkie.org>

* 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