From: Bruno Wolff III <bruno@wolff.to>
To: Ângelo Marcos Rigo <angelo_rigo@yahoo.com.br>
Cc: pgsql-php@postgresql.org
Subject: Re: formating dates
Date: Tue, 14 Jun 2005 15:31:28 -0500
Message-ID: <20050614203128.GB19923@wolff.to> (raw)
In-Reply-To: <20050614194425.18990.qmail@web33707.mail.mud.yahoo.com>
References: <20050614194425.18990.qmail@web33707.mail.mud.yahoo.com>
On Tue, Jun 14, 2005 at 16:44:25 -0300,
Ângelo Marcos Rigo <angelo_rigo@yahoo.com.br> wrote:
> Hi can i format dates from postgresql stored in the
> aaa-mm-dd format to June 14 2005 - Tuesday ?
>
> using just postgresql functions?
You can use the to_char function. See:
http://www.postgresql.org/docs/8.0/static/functions-formatting.html
Note that dates aren't actually stored as aaa-mm-dd internally.
You might want something like:
area=> select to_char(current_date, 'Month DD YYYY Day');
to_char
-----------------------------
June 14 2005 Tuesday
(1 row)
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: bruno@wolff.to, angelo_rigo@yahoo.com.br
Subject: Re: formating dates
In-Reply-To: <20050614203128.GB19923@wolff.to>
References: <20050614194425.18990.qmail@web33707.mail.mud.yahoo.com> <20050614203128.GB19923@wolff.to>
* 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