title: SimpleDateFormat get only the time
body: <p>I have a problem when I try to get only the time from a Timestamp.</p>
  
  <p>An example of the Timestamp is:</p>
  
  <p>2012-04-19T23:05:00+0200</p>
  
  <p>I think the format is "yyyy-MM-dd'T'HH:mm:ss.SSSZ" right?
  And it must be "HH:mm".</p>
  
  <p>I use the following code, but it returnes nothing:</p>
  
  <pre><code>public String getTime(String Vertrektijd){
          final SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ");
          Date dateObj;
          String newDateStr = null;
          try
          {
              dateObj = df.parse(Vertrektijd);
              SimpleDateFormat fd = new SimpleDateFormat("HH:mm");
              newDateStr = fd.format(dateObj);
          }
          catch (Exception e)
          {
            e.printStackTrace();
          }
          return newDateStr;
      }
  </code></pre>
  
  <p>Thanks for the help!</p>