public void calcDayMonthYear()
{
DateTime dayStart;
DateTime dateEnd;
dayStart = Convert.ToDateTime(frmdate.Text);
dateEnd = Convert.ToDateTime(todate.Text);
TimeSpan ts = dateEnd - dayStart;
double Years = Convert.ToDouble(ts.TotalDays) / 365;
double Months = Years * 12;
double Days = Convert.ToDouble(ts.TotalDays);
}
{
DateTime dayStart;
DateTime dateEnd;
dayStart = Convert.ToDateTime(frmdate.Text);
dateEnd = Convert.ToDateTime(todate.Text);
TimeSpan ts = dateEnd - dayStart;
double Years = Convert.ToDouble(ts.TotalDays) / 365;
double Months = Years * 12;
double Days = Convert.ToDouble(ts.TotalDays);
}
No comments:
Post a Comment