I have a string containing:
2013-10-29 18:50:18 +0000
How can i convert this into a date, but keeping the same date format?
I've tried:
NSString *str3 = [[NSString alloc] initWithFormat:@"%@", time];
NSDateFormatter *df = [[NSDateFormatter alloc] init];
[df setDateFormat:@"yyyy-MM-dd hh:mm:ss a"];
NSDate *myDate = [df dateFromString:str3];
But myDate
returns (null)
Any ideas?