I have this string...
2010-08-24T16:00:00-05:00
and I'd like to extract the time portion from it (i.e. 16:00) and convert it to its 12-hour equivalent (i.e. 04:00 pm). I'm trying to use NSDateFormatter to accomplish this, but it's not working...
NSDateFormatter* dateformatter = [[NSDateFormatter alloc] init];
[dateformatter setDateFormat:@"hh:mm a"];
NSDate *date1 = [dateformatter dateFromString:[listOfTimes objectAtIndex:0]];
[dateformatter release];
Can I use NSDateFormatter with this date format? If not, how can I extract the time and convert it to its 12-hour time equivalent?
Thanks!