Convert string date format
I have date in string in this formate "Tue, 23 Oct 2012 01:05:00 +0000" . Now i want to convert date format to " TUE OCT 23 2012 1:05AM ". What is the best way to do this? NSString *dateStr = @"Tue, 25 May 2010 12:53:58 +0000"; // Convert string to date object NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init]; [dateFormat setDateFormat:@"EE, d LLLL yyyy HH:mm:ss Z"]; NSDate *date = [dateFormat dateFromString:dateStr]; But First Create a NSDateFormatter to convert the date string to a NSDate object. Create a second NSDateFormatter (or change the format string of the first) to convert