title: PL/SQL how to make current time variable?
body: <p>My block:</p>
  <pre><code>create or replace procedure currentime IS
      current_time VARCHAR2(50):=  TO_CAHR( SYSDATE, 'YYYY.MM.DD HH24:MI:SS' ) ;
  
      --current_time VARCHAR2(50):=  SELECT TO_CAHR( SYSDATE, 'YYYY.MM.DD HH24:MI:SS' ) FROM DUAL;
  begin
      dbms_output.put_line(current_time);
  end;
  
  set serveroutput on;
  call currentime();
  </code></pre>
  <p>PL/SQL error:</p>
  <p><strong>Error(14,1): PLS-00103: &quot;SET&quot;</strong></p>