在日期选择轮中选择的时间转换成年龄

if (sender.tag == TAG_BUTTON_SUMMIT) {
        NSTimeInterval dateDiff = [[dataPicker date] timeIntervalSinceNow];
        int age= fabs(trunc(dateDiff / (60 * 60 * 24)) / 365);
        ageLabel.text = [NSString stringWithFormat:@"%d", age];
        NSDate *date = [dataPicker date];
        //    限定格式
        NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
        [formatter setDateFormat:@"yyyyMMdd"];
        [formatter setTimeZone:[NSTimeZone timeZoneWithName:@"GMT"]];
       
        NSString *strDate = [formatter stringFromDate:date];
        NSLog(@"$$$$$$$$$$$$$$$$$$$$$$$$$$$%@", strDate);
       
        [_userDic setObject:strDate forKey:USERAGE];
        NSDictionary *user = [NSDictionary dictionaryWithDictionary:_userDic];
        [_dataHandle saveLocalData:USERINFO value:user];
    }