title: NSString to NSDate
body: <p>I got a string that contains the current date by using this :</p>
  
  <pre><code>NSString *date = [[NSDate date] description];
  </code></pre>
  
  <p>At a different point I want to retrieve the date from this string and I used the following code:</p>
  
  <pre><code>[NSDateFormatter setDefaultFormatterBehavior:NSDateFormatterBehavior10_4];
  NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
  //[NSDateFormatter setDefaultFormatterBehavior:NSDateFormatterBehaviorDefault];
  [dateFormatter setDateFormat:@"YYYY-MM-DD HH:MM:SS ±HHMM"];
  
  NSDate *dateFromString = [[NSDate alloc] init];
  dateFromString = [dateFormatter dateFromString:&lt;NSString containing date&gt;];
  </code></pre>
  
  <p>I am getting <code>dateFromString</code> as <code>nil</code> 0x0. What am I doing wrong?</p>