I'm trying to get the birthday property from ABAddressBook on my iphone. I've looked through some discussions over the web and mostly recommends the same answer, which I have tried myself as below. But this still doesn't work for me so I wonder if i missed something else....
dayFormatter = [[[NSDateFormatter alloc] init]autorelease];
[self.dayFormatter setDateFormat:@"MMMM d"];
NSString* today = [dayFormatter stringFromDate:[NSDate date]];
NSLog(@"today:%@", today);
NSLog(@"date:%@", [NSDate date]); // this works fine
NSDate *bday = (NSDate*)ABRecordCopyValue(personRecord,kABPersonBirthdayProperty);
NSLog(@"bdayyyy:%@", bday); // this doesn't work.
NSString* personBday = [dayFormatter stringFromDate:bday];
NSLog(@"Bday:%@", personBday);
any help is much appreciated.. Thanks.