In my database the age is 1946 and when we get the log is 2046, we need 1946 as calculate the Global.age. May I ask what wrong with my code? Is that any wrong of my code?
timespan = DateTime.Now.Subtract(Convert.ToDateTime(patientInfo[0].DOB));
Global.age = Convert.ToInt32(timespan.TotalDays) / 365;
log.EventLog("DoB: " + patientInfo[0].DOB);
log.EventLog("Scan Page Age: " + timespan.ToString() + " " + Global.age.ToString());
this.NavigationService.Navigate(Global.bmiPage);