In SQL, how do you format a date to give you the full month?

Hello,

I have an SQL query that returns a date object.

I can get the query to return the month as an integer like this

to_char(item.ENTRY_DATE, 'MM') as Month

For example, a date with the month of September would be 09.

However, what I really need is for the month to be returned as its actual name - ie:  'September' or even 'Sep'

I've tried DATENAME, DATE_FORMAT, and a few other things.  None of these work.


Any suggestions?

Thanks in advance
tmitch1968Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

chaauCommented:
TO_CHAR(item.ENTRY_DATE, 'MON') will return you the Abbreviated month name (like Sep, Nov)
TO_CHAR(item.ENTRY_DATE, 'MONTH') will return you the whole month name (like September, November)
Here is the list of all format models
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
HuaMin ChenProblem resolverCommented:
Try
select to_char(sysdate,'Month') from dual;

Open in new window

0
tmitch1968Author Commented:
Thanks!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.