title: How to convert text formdata from jsp to date inside an servlet?
body: <p>I have a jsp file to get data via form, and passing it to a servlet.</p>
  
  <pre><code>&lt;form action="RegistrationProcessing" method="get"&gt;
  Date of Birth:&lt;input type="text" name="dob"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>This is the servlet file</p>
  
  <pre><code>protected void doGet(HttpServletRequest request, HttpServletResponse response)
  throws   ServletException, IOException {
  String dateofbirth=request.getParameter("dob");
  }
  </code></pre>
  
  <p>I can't change the datatype of dateofbirth variable. It is saying it must be only string, what should i do now to store it as different datatype.I want to store in oracle database where the date format is '01-JAN-2013' , how can i parse to this datatype. </p>