4 Replies Latest reply: May 7, 2012 6:42 PM by Amatu Allah Neveen Ebrahim RSS

    How to assign the leap year.

    MAHA REDDY
      procedure sln_process(p_cost IN NUMBER, --ASSET_COST (350)
      p_salvage IN NUMBER, --SALVAGE_LIFE  (250)
      p_life IN NUMBER, --ASSET_LIFE    (15)
      p_commision_date IN DATE, --COMMISION_DATE  365
      p_depr_cost OUT NUMBER)
      is
      v_cost Number;
      v_days number;
      v_dep_value number;
      v_daywise_dep number;


      begin
      v_cost := (p_cost-P_salvage)/asset_life;
      v_days := floor(sysdate - p_commision_date);
      v_dep_value := v_cost/365; ---------------------------HERE i APPLIED NORMAL YEAR . HOW WILL ASSIGN THE LEAP YEAR ALSO .
      v_daywise_dep := v_dep_value*v_days;
      p_depr_cost := v_daywise_dep;

      end sln_process;


      Please let you know me as soon as possible any solution.

      Thanks
      Mohan