title: How to convert extracted value from datetime to char in Oracle?
body: <p>I need convert to char the extracted year from datetime to char in Oracle PL/SQL. How can I reach this?
  The code gives me <code>PLS-00306: wrong number or types of arguments tips 'TO_CHAR'</code></p>
  <pre><code>create or replace PROCEDURE PrintCustomersKPI IS
    v_average_duration NUMBER;
    v_tab CHAR := chr(9);
  BEGIN
     FOR v_year IN (SELECT DISTINCT EXTRACT(year FROM purchaseday) as PurchaseYear FROM Purchase ORDER BY PurchaseYear DESC)
      LOOP
          dbms_output.put_line('YEAR: ' || TO_CHAR(v_year, 'yyyy'));
      END LOOP;
  END;
  EXEC PrintCustomersKPI;
  </code></pre>