i use this code to get informations from strings with this format "01-05-2011"
NSDateFormatter *formatter = [[[NSDateFormatter alloc] init] autorelease];
[formatter setDateFormat:@"dd'-'MM'-'yyyy"];
// Your date represented as a NSDate
NSDate *dateDepart = [formatter dateFromString:daparatureFly.date];
NSDateComponents *comps = [[NSCalendar currentCalendar] components:NSYearCalendarUnit|NSMonthCalendarUnit|NSDayCalendarUnit
fromDate:dateDepart];
Then when i take the month like this [comps day],[comps month] , i have 1 and 5 , i want to have 01, 05 . Any one can help me ? thanx