title: JDBC - ORA-01861: literal does not match format string 01861
body: <p>I have problem with retrieving a data from oracle data base<br>
  I want to access data by using two <code>JDatechoosers</code>...<br>
  I use <code>JDatechooser</code> to store date value in database of type date.</p>
  
  <pre><code>chooser=new JDateChooser();
  chooser.setBounds (200, 175, 175, 25);
  chooser.setDateFormatString("dd-MM-yyyy");
  pstmt.setDate(5, new java.sql.Date(chooser.getDate().getTime()));
  </code></pre>
  
  <p>I want to access data between two dates using two <code>JDatechooser</code> values as fallows..</p>
  
  <pre><code>    chooser = new JDateChooser();       
      chooser.setBounds (100, 15, 100, 25);
      chooser.setDateFormatString("dd-MM-yyyy");
      chooser.addFocusListener (this);
  
      chooser1 = new JDateChooser();      
      chooser1.setBounds (220, 15, 100, 25);
      chooser1.setDateFormatString("dd-MM-yyyy");
      chooser1.addFocusListener (this);
  
     ResultSet rs = st.executeQuery("SELECT * FROM Bill WHERE B_DATE BETWEEN '"+new java.sql.Date(chooser.getDate().getTime())+"' AND '"+new java.sql.Date(chooser1.getDate().getTime())+"' ");
  </code></pre>
  
  <p>I get the error as</p>
  
  <blockquote>
    <p><code>SQL Error: ORA-01861: literal does not match format string 01861</code></p>
  </blockquote>
  
  <p>please help me to solve this</p>