title: Add date parameter to oracle query
body: <p>What I'm trying to do is to execute the query between two dates, and the dates would come from a parameter.</p>
  
  <p>In the below code, I'm putting one parameter and letting the second date as fixed just for example purposes. </p>
  
  <p>The code / query is kind of long to paste it here, but here is a short version:</p>
  
  <pre><code>OracleParameter fromDateParameter = new OracleParameter();
  fromDateParameter.OracleDbType = OracleDbType.Varchar2;
  fromDateParameter.Value = "'3/06/2013 20:00:00'";
  
  this.oracleDataAdapter4.SelectCommand = new OracleCommand("
     SELECT DISTINCT (LOG.RID) FROM LOG WHERE LOG.TIMESTAMP 
     BETWEEN TO_DATE(:fromDateParameter, 'MM/DD/YYYY hh24:mi:ss ') 
     AND TO_DATE('3/06/2013 23:59:00', 'MM/DD/YYYY hh24:mi:ss '))", 
     oracleConnection4);
  
  oracleDataAdapter4.SelectCommand.Parameters.Add(fromDateParameter);           
  this.oracleDataAdapter4.Fill(event11);
  </code></pre>
  
  <p>And I got this message:</p>
  
  <blockquote>
    <p>ORA-01858: a non-numeric character was found where a numeric was
    expected</p>
  </blockquote>
  
  <p>I did the same query without the parameter and it works just fine.</p>
  
  <p>Thanks</p>