Task: Show a UIDatePicker and grab the selected date, then display the selected date in a label (in the format of Day, Month, Year).
Current progress:
-(IBAction)pressButton:(id)sender
{
NSDate *selected = [datePicker date];
NSString *message = [[NSString alloc] initWithFormat:@"%@", selected];
date.text = message;
}
This will display the date in the format of YYYY-MM-DD 23:20:11 +0100. I do not want to display the time. I also want to display the date in a different format.
Is it possible to access the individual components of the date picker ie. datePicker.month
Any solutions or links is greatly appreciated.