title: How to convert datetime to String in java?
body: <p>while working on facebook api I encountered a field called start_time is of type datetime, i declared a start_time field as a string in my DTO class, while i was converting json to java i could able to get the start_time and i populated in my dto object but when i tried retrievng from the DTO object it showing me null. </p>
  
  <pre><code>DataDTO data  = new DataDTO();
  String start_time = item.getString("start_time").toString();    
  data.setStart_time(start_time);
  System.out.println(start_time )   // 2016-03-12T22:00:00-0300
  System.out.println(data.getStart_time()); // getting null
  </code></pre>
  
  <p>my DTO class</p>
  
  <pre><code>public class DataDTO implements Serializable{
  
      private String id;
      private String name;
  
      private String start_time;
      private String timezone;
      private String location;    
      private String end_time;
  
      //getters and setters
  }
  </code></pre>
  
  <p>my sample json data</p>
  
  <pre><code>{  
        "id":"1443832172536969",
        "timezone":"America/New_York",
        "location":"Atlanta, GA, United States",
        "name":"Atlanta Dream Tour 2015",
        "start_time":"2016-03-12T22:00:00-0300"
     }
  </code></pre>
  
  <p>When i googled i came to know that DateTime is something belongs to joda time api what exactly it is? Do i need to include any jar files in my project for joda-time api?</p>
  
  <p>I tried creating DateTime dt = new DateTime(); in my method it showing DateTime cannot be resolved to a type.</p>
  
  <p>I am using java version 1.7.0_40 does this support joda-time.
  i tried converting to string using toString() method but no use.
  Please help me how can i convert DateTime to string?</p>