i take the user date from facebook , it look like
"birthday_date" = "03/04/1987" i wrote this code
NSDateFormatter *dateFormatter = [[[NSDateFormatter alloc] init] autorelease];
[dateFormatter setDateFormat:@"dd/MM/YYYY"];
NSDate *dateFromString = [dateFormatter dateFromString:birthDate];
NSLog(@"dateformstring %@ ",dateFromString);
[birthPicker setDate:dateFromString animated:YES];
and the result date from string si : 1988-12-25 23:00:00 +0000 , i have this date selected in the picker , I do not know where did this date :/
Made an NSString extension for that.
Thanks to NSDataDetector, it recognizes a whole lot of format.
Part of eppz!kit, grab the category NSString+EPPZKit.h from GitHub.
Try
[dateFormatter setDateFormat:@"dd/MM/yyyy"];
oops. As tilo said, use "yyyy." As mentioned in the Apple docs:
"A common mistake is to use YYYY. yyyy specifies the calendar year whereas YYYY specifies the year (of "Week of Year"), used in the ISO year-week calendar."