title: Oracle 01830 error while converting string to date in oracle procedure
body: <p>Following is the first few lines of my stored procedure in oracle. All I am trying to do is to pass a string into procedure, convert it into date and use it in a query. But it doesn't seem to work. Currently, the error I am being thrown at is as following:</p>
  <blockquote>
  <p>ORA-01830: date format picture ends before converting entire input string</p>
  <p>ORA-06512: at &quot;APPS.PORDUCTPLANNINGFORECAST&quot;, line 26</p>
  <p>ORA-06512: at line 1</p>
  </blockquote>
  <pre><code>CREATE OR REPLACE PROCEDURE APPS.PorductPlanningForecast (
     vDateFrom        IN varchar2,
     vDateTo          IN varchar2 , 
     vForecastSetDPL2 IN varchar2, 
     out              SYS_REFCURSOR
  )
  IS 
    L_CURSOR SYS_REFCURSOR; 
    vfrom    date; 
    vto      date;
  BEGIN
    vfrom:= TO_DATE(vDateFrom,'DD/MM/YYYY HH24:MI:SS');
    vto:=TO_DATE(vDateTo,'DD/MM/YYYY HH24:MI:SS');
  </code></pre>
  <p>the lines having <code>TO_DATE()</code> are line 26 and 27. Also, the format I am passing in is through c# which is <code>System.DateTime</code> format(<code>&quot;01/08/2013 12:00:00 AM&quot;</code>) converted into a string and then passed through <code>add</code> parameter as  gave up on passing date as date due to date conversion errors. Please help..</p>