I have a UIDatePicker that shows (ex. April | 13 | 2010). I need to get each component value and set it as an integer so it can be put into three separate keys in a Plist.
MyMonth Number 04
MyDay Number 13
MyYear Number 2010
I can set a text label by using:
NSDateFormatter *df = [[NSDateFormatter alloc] init];
df.dateStyle = NSDateFormatterMediumStyle;
dateLabel.text = [NSString stringWithFormat:@"%@",
df stringFromDate:datePkr.date]];
[df release];
But I just need to convert each component value to integer. Would it be easier creating a UIPickerView with date array and doing it that way?