I have time in NSString like \"15:15\"
I want to covert this NSString time into 12 hr NSString(i.e \"3:15 PM\").
@python
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; NSLocale *locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"]; [dateFormatter setLocale:locale]; [dateFormatter setDateFormat:@"hh:mm"];
Hope this helps!