title: NSDateFormatter and yyyy-MM-dd
body: <p>I'm trying to take a NSString date in the format "2/22/11" and convert it to this format: 2011-02-22</p>
  
  <p>This is my code:</p>
  
  <pre><code>NSDate *dateTemp = [[NSDate alloc] init];
  NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];
  [dateFormat setDateFormat:@"yyyy-MM-dd"];
  dateTemp = [dateFormat dateFromString:newInvoice.date];
  newInvoice.date = [dateFormat stringFromDate:dateTemp];
  </code></pre>
  
  <p><code>newInvoice.date</code> starts as an NSString equal to "2/22/11". <code>dateTemp</code> ends up NIL. <code>newInvoice.date</code> ends up NIL as well. </p>
  
  <p>I can't for the life of me figure out why.</p>