Oracle extract function for datetime. can i use formatting

Is there a formatting option for the oracle extract (datetime) function.  I would like to use month, day, year but only 'RR' / YY' and month in 'MM'. The month is a date data type and i would like to use it in by group by clause. I do not want to return the time.

Tay JohnsonAsked:
Who is Participating?

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

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.

slightwv (䄆 Netminder) Commented:
I don't understand what you are asking but I'm thinking extract isn't what you want.

If you want to query a date column by specific pieces you may invalidate any index usage.

If you have a date column and only want the date without time:  trunc(date_column).  That zeros out the time portion.

If you can provide more detail, we can probably tell you better options.
awking00Information Technology SpecialistCommented:
select trunc(date,'mm) will give you the first day of the month, then you can use to_char(date,'MM/DD/RR') to format

SQL> select to_char(trunc(sysdate,'mm'),'MM/DD/RR') from dual;


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
Tay JohnsonAuthor Commented:
I want to group by month in this format. 12/01/18. The month is a date data type.

Im truing to write a quert using a Group by clause with inq_num, s_itm_num, code, month, original_Weight, highest_weight. And im having problems grouping by months.
slightwv (䄆 Netminder) Commented:
I do not know what you mean with "group by month in this format. 12/01/18".

Try what awking00 posted but without the to_char:

select ...
group by trunc(sysdate,'mm')

If that doesn't help, please provide some sample data and expected results so we can see what you are trying to do.
Tay JohnsonAuthor Commented:
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

From novice to tech pro — start learning today.