How do we get the current YEAR and the current Quarter as of TODAY ?. A simple solution is given below.
This can be used under the DEAFULT section of any items in APEX to have the value assigned by default and it can be used across any reports / process etc..
Solution:
--to get current year
SELECT TO_CHAR(SYSDATE,'YYYY') from dual;
--to get current quarter
Select 'Q'||TO_CHAR(sysdate, 'Q') from dual;
Comments
Post a Comment