Get month name from date in Oracle
How to fetch month name from a given date in Oracle?
If the given date is '15-11-2010'
then I want November
from this date.
Solution 1:
select to_char(sysdate, 'Month') from dual
in your example will be:
select to_char(to_date('15-11-2010', 'DD-MM-YYYY'), 'Month') from dual
Solution 2:
Try this,
select to_char(sysdate,'dd') from dual; -> 08 (date)
select to_char(sysdate,'mm') from dual; -> 02 (month in number)
select to_char(sysdate,'yyyy') from dual; -> 2013 (Full year)
Solution 3:
to_char(mydate, 'MONTH')
will do the job.