Removing and reformatting of NSDate is not working?
<p>I am trying to reformat this NSdate (2016-02-11 01:00:00 +0000 ) into this (11-02-2016).</p>
<p>I have used below code and its returning null.</p>
<pre><code>//newDate format is 2016-02-11 01:00:00 +0000
NSString *dateString = [[self dateFormatter] stringFromDate:newDate];
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@&quot;yyyy-MM-dd HH:mm:ss&quot;];
NSDate *date = [dateFormatter dateFromString:dateString];

// Convert date object into desired format
[dateFormatter setDateFormat:@&quot;dd-MM-yyyy&quot;];
NSString *newDateString = [dateFormatter stringFromDate:date];
NSLog(@&quot;people%@&quot;,newDateString); //printing null
</code></pre>