I have date in NSString format as "Wed Jul 29 14:46:11 +0000 2015". I have tried all possible ways of converting this string into NSDate. But couldn't find the right format for type of string.
Can someone help out or give suggestion to convert this into NSDate.
Below is the code:
NSDateFormatter *format = [[NSDateFormatter alloc] init];
format.dateFormat = @"EEEE MM dd HH:mm:ss Z YYYY";
//[format setTimeZone:[NSTimeZone timeZoneWithName:@"GMT"]];
NSLocale *locale = [[NSLocale alloc]initWithLocaleIdentifier:@"en_US_POSIX"];
[format setLocale:locale];
NSDate *date = [format dateFromString:@"Wed Aug 19 17:36:46 +0000 2015"];
NSLog(@"converted date is %@",date);*
But its returning wrong date as converted date is 2014-12-24 17:36:46 +0000
Thanks.