title: Java 6 alternatives for LocalDate and DateTimeFormatter
body: <p>In a Java 8 project, I can parse the date this way:</p>
  
  <pre><code>LocalDate.parse(
      newDateString, 
      DateTimeFormatter.ofPattern(expectedDateFormat) 
  )
  .format(
      DateTimeFormatter.ofPattern(expectedDBDateFormat)
  );
  </code></pre>
  
  <p>My problem is that I have a Java 6 project, and <code>LocalDate</code> and <code>DateTimeFormatter</code> are not defined for Java 6.</p>
  
  <p>How can I parse the date in my Java 6 project?</p>