Check out the documentation here:
select to_char(date_col,'Month YYYY') from tablename;
might do the trick, if date_col is your column with a timestamp.
----- Original Message -----
From: "Rodolfo J. Paiz" <rpaiz(at)simpaticus(dot)com>
Sent: Monday, January 24, 2005 8:42 PM
Subject: [NOVICE] Formatting a month in query output
> I have a query which needs to provide a monthly report. Thanks to the
> date_trunc() function someone mentioned in a thread earlier today, I got
> the query working properly. However, each month is '2004-10-01 00:00:00'
> and I would like to have "October 2004".
> Which function, if any, would help me do this formatting trick? And
> where can I read more about it? Or must I use a PHP case statement in
> the web page to do this reformatting manually?
> Rodolfo J. Paiz <rpaiz(at)simpaticus(dot)com>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
In response to
pgsql-novice by date
|Next:||From: Jason Dixon||Date: 2005-01-25 02:13:43|
|Subject: Re: SQL and function reference?|
|Previous:||From: Alexander Borkowski||Date: 2005-01-25 02:06:18|
|Subject: Re: Formatting a month in query output|