title: How to check is it parameters in declare section equal to sysdate - stored procedure
body: <p>I have a problem with checking variables, when I try to convert those variables in date to check <code>if statement</code>, when creating <code>stored procedure</code>.</p>
  
  <p>Code like this </p>
  
  <pre><code> create or replace procedure test 
   as
     dan nvarchar2(2) :='1'; 
     mesec nvarchar2(2) := '1';
     godina nvarchar2(4) := '2016';
   begin
     if to_date(dan||mesec||godina,'dd-mon-yy') != sysdate
     then 
       for dan in 1..12 loop
         dbms_output.put_line(dan);
       end loop;
      end if;
   end;
  </code></pre>
  
  <p>These 3 variables are nvarchar2, what is needed by to_date function as a parameter. But when try to convert these variables to a date, and check is it equal to <code>sysdate</code>, give me next error</p>
  
  <pre><code>ORA-01861: literal does not match format string
  </code></pre>
  
  <p>I don't know how to fix it?</p>