close
string[] birthday = ds.Tables[0].Rows[i]["選手生日"].ToString().Split('-');
DateTime today = DateTime.Today; DateTime bday = new DateTime(Convert.ToInt16(birthday[0]), Convert.ToInt16(birthday[1]), Convert.ToInt16(birthday[2])); int age = today.Year - bday.Year; if (bday > today.AddYears(-age)) age--;
全站熱搜