title: IOS how to set date format
body: <p>I have a string like this </p>
  
  <pre><code>NSString *datestr = @"2013-08-06T03:51:54+00:00";
  </code></pre>
  
  <p>I try to set dateformat as below: </p>
  
  <pre><code>NSDateFormatter *dformat = [[NSDateFormatter alloc]init];
  
  [dformat setDateFormat:@"yyyy-MM-dd'T'HH:mm:ss"];
  
  NSDate *date = [dformat dateFromString:datestr];
  </code></pre>
  
  <p>But the date will be nil, so, can anyone tell me how to set the dateformat, thx!</p>