title: Parsing a String into date with pattern:"dd/MM/yyyy"
body: <p>I want to insert a date having this format MM/dd/YYYY for example:04/29/2010 to 29/04/2010 to be inserted into mysql database in a field typed Date.
  So i have this code:</p>
  
  <pre><code>String dateimput=request.getParameter("datepicker");
  DateFormat df = new SimpleDateFormat("dd/MM/yyyy");
  Date dt = null;
  try
  {
       dt = df.parse(dateimput);           
       System.out.println("date imput is:" +dt);
  } 
  catch (ParseException e)
  {
       e.printStackTrace();
  }
  </code></pre>
  
  <p>but it gives me those error:</p>
  
  <p>1-date imput is:Fri May 04 00:00:00 CEST 2012 (it is not the correct value that have been entered).</p>
  
  <p>2-dismatching with mysql date type.</p>
  
  <p>I can not detect the error exactly.
  Please help.</p>