I want to print the time from date picker but with the AM/PM. I can print the time, but it never prints the AM/PM. How can I do this?
You could use this document for more information NSDateFormatter Class Reference .An example could be:
NSDate* date = [NSDate date];
NSDateFormatter* dateFormatter = [[[NSDateFormatter alloc] init] autorelease];
[dateFormatter setDateFormat:@"MM/dd/yyyy"];
[formatter setTimeStyle:NSDateFormatterFullStyle];
NSLog(@"date=%@",[dateFormatter stringFromDate:date]);