title: How to use the "to_date" function in Oracle with a variable as parameter?
body: <p>I have a stored procedure that contains the following:</p>
  
  <pre><code>V_DATACONVERTIDA varchar2(100) := TO_DATE('27/10/1994 23:59:59', 'DD/MM/YYYY HH24:MI:SS.SSSSS');
  </code></pre>
  
  <p>It works fine, but the problem is I gotta make that date a variable. So I created</p>
  
  <pre><code>V_DATAEXPIRACAO VARCHAR2(100) := p__formdata;
  </code></pre>
  
  <p>being <em>p__formdata</em> (varchar2) a parameter from the SP.</p>
  
  <p>When I made that change, though, I got the following error: </p>
  
  <p><strong>ORA-01858: a non-numeric character was found where a numeric was expected</strong></p>