title: iOS get Time from Date
body: <p>I'm developing an application and I need to parse a Tweet timestamp that actually is a string like this:</p>
  
  <p>"Mon, 17 Oct 2011 10:20:40 +0000"</p>
  
  <p>However what I need it is only the time. So what I'm trying to get it is:</p>
  
  <pre><code> NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
   [dateFormatter setDateFormat:@"HH:mm"];
   NSDate *date = [dateFormatter dateFromString:timestamp];
  </code></pre>
  
  <p>but when I try to print the Date with NSLog the output is (null) and I don't understand why. What I need, if it is possible, is to create a date object only with the time. Indeed later on I need to compare different dates but I care only about the time. It is not important if the date are different because of the day, month or year, the important is that I can compare them with the "timeIntervalSinceDate" to get the difference in seconds.</p>
  
  <p>Any help will be really appreciated.</p>
  
  <p>Thanks
  Ale</p>