pg.ddx.io pgsql-php@postgresql.org mailing list archive
help / color / mirror / Atom feedformating dates
4+ messages / 4 participants
[nested] [flat]
* formating dates
@ 2005-06-14 19:44 Ângelo Marcos Rigo <angelo_rigo@yahoo.com.br>
0 siblings, 3 replies; 4+ messages in thread
From: Ângelo Marcos Rigo @ 2005-06-14 19:44 UTC (permalink / raw)
To: pgsql-php
Hi can i format dates from postgresql stored in the
aaa-mm-dd format to June 14 2005 - Tuesday ?
using just postgresql functions?
thank´s in advance
Ângelo Marcos Rigo
AMR Informática
(51) 3348 0870
Rua Pe. Alois Kades 400/210
Porto Alegre /RS/Brasil
http://amr.freezope.org
angelo_rigo@yahoo.com.br
__________________________________________________
Converse com seus amigos em tempo real com o Yahoo! Messenger
http://br.download.yahoo.com/messenger/
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: formating dates
@ 2005-06-14 19:52 Philip Hallstrom <postgresql@philip.pjkh.com>
parent: Ângelo Marcos Rigo <angelo_rigo@yahoo.com.br>
2 siblings, 0 replies; 4+ messages in thread
From: Philip Hallstrom @ 2005-06-14 19:52 UTC (permalink / raw)
To: Ângelo Marcos Rigo <angelo_rigo@yahoo.com.br>; +Cc: pgsql-php
> Hi can i format dates from postgresql stored in the
> aaa-mm-dd format to June 14 2005 - Tuesday ?
>
> using just postgresql functions?
Yes.
http://www.postgresql.org/docs/7.4/interactive/functions-formatting.html
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: formating dates
@ 2005-06-14 19:58 Steve Crawford <scrawford@pinpointresearch.com>
parent: Ângelo Marcos Rigo <angelo_rigo@yahoo.com.br>
2 siblings, 0 replies; 4+ messages in thread
From: Steve Crawford @ 2005-06-14 19:58 UTC (permalink / raw)
To: Ângelo Marcos Rigo <angelo_rigo@yahoo.com.br>; pgsql-php
On Tuesday 14 June 2005 12:44 pm, Ângelo Marcos Rigo wrote:
> Hi can i format dates from postgresql stored in the
> aaa-mm-dd format to June 14 2005 - Tuesday ?
>
> using just postgresql functions?
select to_char(now(), 'FMMonth dd yyyy - FMDay');
See to_char() documentation for more.
Cheers,
Steve
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: formating dates
@ 2005-06-14 20:31 Bruno Wolff III <bruno@wolff.to>
parent: Ângelo Marcos Rigo <angelo_rigo@yahoo.com.br>
2 siblings, 0 replies; 4+ messages in thread
From: Bruno Wolff III @ 2005-06-14 20:31 UTC (permalink / raw)
To: Ângelo Marcos Rigo <angelo_rigo@yahoo.com.br>; +Cc: pgsql-php
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)
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2005-06-14 20:31 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-06-14 19:44 formating dates Ângelo Marcos Rigo <angelo_rigo@yahoo.com.br>
2005-06-14 19:52 ` Philip Hallstrom <postgresql@philip.pjkh.com>
2005-06-14 19:58 ` Steve Crawford <scrawford@pinpointresearch.com>
2005-06-14 20:31 ` Bruno Wolff III <bruno@wolff.to>
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