date_part

Started by Rudi Starcevicover 23 years ago2 messages
#1Rudi Starcevic
rudi@oasis.net.au

Hi,

When using the date_part function is it possible to get the month name
and not the month number ?
I'm using something like 'date_part('month', birth_date)' - birth_date
being a date data type.

Currently I'm getting numbers from 1 to 12 whereas I'd like the full
name like 'June' or 'July' etc.

Thanks
Rudi.

#2Josh Berkus
josh@agliodbs.com
In reply to: Rudi Starcevic (#1)
Re: date_part

Rudi,

select to_char(date_column, 'Month');

See similar under "Formatting Function" in the docs.

--
-Josh Berkus