title: Retrieving hours in 24 hour format in iphone
body: <p>I am using this format to get hours </p>
  
  <pre><code>   NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
      dateFormatter.dateFormat = @"hh";
      [dateFormatter setTimeZone:[NSTimeZone systemTimeZone]];
  
      NSString *date = [dateFormatter stringFromDate:now];
  
      NSInteger myHour = [date intValue];
  </code></pre>
  
  <p>The problem is it returns e.g <code>4Pm</code> i Want it to return <code>16</code> Instead of 4. How can I do that? I tried replacing hh by single h by of no avail.</p>