Re: formating dates - Mailing list pgsql-php

From Bruno Wolff III
Subject Re: formating dates
Date
Msg-id 20050614203128.GB19923@wolff.to
Whole thread Raw
In response to formating dates  (Ângelo Marcos Rigo <angelo_rigo@yahoo.com.br>)
List 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)

pgsql-php by date:

Previous
From: Steve Crawford
Date:
Subject: Re: formating dates
Next
From: "enzo venegas palacios"
Date:
Subject: pg_dump