title: Convert date using joda time and ignore time
body: <p>Using the below code I'm attempting to convert a time: <code>"2014-10-31T23:59:59"</code> to just 
  <code>"yyyy-MM-dd"</code> format, so in this case <code>"2014-10-31"</code>.</p>
  
  <p>Here is the code : </p>
  
  <pre><code>import org.joda.time.DateTime;
  import org.joda.time.format.DateTimeFormat;
  import org.joda.time.format.DateTimeFormatter;
  
  public class TestConvert {
  
      public static void main(String args[]){
          DateTimeFormatter formatter = DateTimeFormat.forPattern("yyyy-MM-dd");
          DateTime dt = formatter.parseDateTime("2014-10-31T23:59:59");
          System.out.println("formatted date is "+dt.toString());
      }
  
  }
  </code></pre>
  
  <p>exception : </p>
  
  <pre><code>Exception in thread "main" java.lang.IllegalArgumentException: Invalid format: "2014-10-31T23:59:59" is malformed at "T23:59:59"
      at org.joda.time.format.DateTimeFormatter.parseDateTime(DateTimeFormatter.java:899)
      at (TestConvert.java:11)
  </code></pre>
  
  <p>How to ignore the time and just create a date?</p>