From: | Bruno Wolff III <bruno(at)wolff(dot)to> |
---|---|
To: | Ângelo Marcos Rigo <angelo_rigo(at)yahoo(dot)com(dot)br> |
Cc: | pgsql-php(at)postgresql(dot)org |
Subject: | Re: formating dates |
Date: | 2005-06-14 20:31:28 |
Message-ID: | 20050614203128.GB19923@wolff.to |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-php |
On Tue, Jun 14, 2005 at 16:44:25 -0300,
Ângelo Marcos Rigo <angelo_rigo(at)yahoo(dot)com(dot)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)
From | Date | Subject | |
---|---|---|---|
Next Message | enzo venegas palacios | 2005-06-14 22:34:44 | pg_dump |
Previous Message | Steve Crawford | 2005-06-14 19:58:17 | Re: formating dates |