title: NSDateFormatter stringFromDate, dateFromString both returning nil
body: <p>Hi i'm trying to format my <code>NSString</code>. But its not working. I tried all the answers which i got in <strong>stackoverflow</strong>, But nothing works for me.</p>
  
  <pre><code>NSLog(@"log 1: %@ %@", [dealDetailsDict objectForKey:@"DealDateViewed"], [[dealDetailsDict objectForKey:@"DealDateViewed"] class]);
  NSDateFormatter *df = [[NSDateFormatter alloc] init];
  [df setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
  NSLog(@"log 2: %@ %@", [df stringFromDate:[dealDetailsDict objectForKey:@"DealDateViewed"]], [df dateFromString:[dealDetailsDict objectForKey:@"DealDateViewed"]]);
  </code></pre>
  
  <p>I don't know what is the problem is here, both <code>stringFromDate</code> and <code>dateFromString</code> returning <code>nil</code>. This is my <code>NSLog</code>.</p>
  
  <pre><code>log 1: 2013-01-09 10:02:45 +0000 __NSCFString
  log 2: (null) (null)
  </code></pre>
  
  <p>I want to display date like <code>31-12-2010</code>. So i set,</p>
  
  <pre><code>[df setDateFormat:@"dd-MM-yyyy"];
  </code></pre>
  
  <p>Here my problem started.</p>