How to get fiscal year start date in Oracle HRMS Payroll

 PL-SQL Function is given below. Date is provided as parameter.


CREATE OR REPLACE FUNCTION APPS.CUST_GET_FISCAL_YEAR_START (P_SYSDATE IN DATE)
   RETURN DATE
IS

/*
    PROGRAM ID      :   APPS.CUST_GET_FISCAL_YEAR_START
    DESCRIPTION     :   RETURN FISCAL START DATE OF THE DATE PROVIDED
*******************************************************************************************
*/
   RESULT   DATE;
BEGIN
   SELECT TO_DATE ('01-JUL-' || TO_CHAR (ADD_MONTHS (TRUNC (P_SYSDATE), -6),
                                      'YYYY')
               ) AS FY_START INTO RESULT
  FROM DUAL;

   RETURN RESULT;
EXCEPTION
   WHEN OTHERS
   THEN
      RETURN NULL;
END;


1 comment:

  1. Great post! I am actually getting ready to across this information, It's very helpful for this blog.Also great with all of the valuable information you have Keep up the good work you are doing well.
    Digital Marketing Training in Chennai

    Digital Marketing Course in Chennai

    ReplyDelete