Обсуждение: date_part

Поиск
Список
Период
Сортировка

date_part

От
Rudi Starcevic
Дата:
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.



Re: date_part

От
Josh Berkus
Дата:
Rudi,

select to_char(date_column, 'Month');

See similar under "Formatting Function" in the docs.

--
-Josh Berkus