title: Convert date string(2016-04-27T08:06:07.531Z) to specific date format dd.MM.YYYY
body: <p>I have date string in the format 2016-04-27T08:06:07.531Z and want to convert into 2016.04.27. I have tried following code </p>
  
  <pre><code>NSString *dateString = @"2016-04-27T08:06:07.531Z";
  
  NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
  [dateFormatter setDateFormat:@"yyyy-MM-ddTHH:mm:ss.Z"];
  
  NSDate *dateReceived = [dateFormatter dateFromString:dateString];
  [dateFormatter setDateFormat:@"dd.MM.YYYY"];
  
  NSString *dateReq = [dateFormatter stringFromDate:dateReceived];
  
  NSLog(@"Date Req:%@",dateReq);
  </code></pre>
  
  <p>I am getting null in console for NSLog. Any help will be appreciated. Thanks. </p>