formating dates

formating dates

am 14.06.2005 21:44:25 von angelo_rigo

Hi can i format dates from postgresql stored in the
aaa-mm-dd format to June 14 2005 - Tuesday ?

using just postgresql functions?

thank=B4s in advance=20


=C2ngelo Marcos Rigo
AMR Inform=E1tica=20
(51) 3348 0870=20
Rua Pe. Alois Kades 400/210=20
Porto Alegre /RS/Brasil
http://amr.freezope.org
angelo_rigo@yahoo.com.br
=20


__________________________________________________
Converse com seus amigos em tempo real com o Yahoo! Messenger=20
http://br.download.yahoo.com/messenger/=20

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Re: formating dates

am 14.06.2005 21:52:22 von Philip Hallstrom

> 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-for matting.html

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Re: formating dates

am 14.06.2005 21:58:17 von Steve Crawford

On Tuesday 14 June 2005 12:44 pm, =C2ngelo 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


---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

Re: formating dates

am 14.06.2005 22:31:28 von Bruno Wolff III

On Tue, Jun 14, 2005 at 16:44:25 -0300,
=C2ngelo Marcos Rigo wrote:
> Hi can i format dates from postgresql stored in the
> aaa-mm-dd format to June 14 2005 - Tuesday ?
>=20
> using just postgresql functions?

You can use the to_char function. See:
http://www.postgresql.org/docs/8.0/static/functions-formatti ng.html

Note that dates aren't actually stored as aaa-mm-dd internally.
You might want something like:
area=3D> select to_char(current_date, 'Month DD YYYY Day');
to_char
-----------------------------
June 14 2005 Tuesday
(1 row)

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster