title: How to format date from string?
body: <p>I have a string with this value:</p>
  
  <pre><code>2010-05-13 23:17:29
  </code></pre>
  
  <p>I'd like to format it and am using the following code:</p>
  
  <pre><code>NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
  formatter.dateStyle = NSDateFormatterMediumStyle;
  NSDate *formattedDate = [formatter dateFromString:dateString];
  [formatter release];
  </code></pre>
  
  <p>When the debugger reaches the release line, formattedDate shows "invalid CFStringRef" and</p>
  
  <pre><code>Cannot access memory at address 0x0
  </code></pre>
  
  <p>Any ideas what I'm doing wrong?</p>