Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Use 'Q' in to_char to indicate Quarter

jhowardSep 22 2011 — edited Sep 22 2011
I want to use just a single to_char function call (or other function) rather than two calls to get the result of 2011Q3 on 11.2.
I'd like:
select to_char(sysdate,'YYYY[something to indicate Q as text]Q') year_quarter 
from dual;
Rather than:
select to_char(sysdate,'YYYY') ||'Q'||to_char(sysdate,'Q') year_quarter 
from dual
Any ideas?
This post has been answered by Centinul on Sep 22 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 20 2011
Added on Sep 22 2011
2 comments
10,826 views