Possible Duplicate:
Calculate Years, Months, weeks and Days
How do I calculate difference in years and months given a start and end date?
Hi
Working on a c# 2.0 project and I need to calculate the difference in years and months given the start and end date
I was thinking of a function like
public void CalculateYearsAndMonths(DateTime startDate,
DateTime endDate,
out int years,
out int months)
{
int years=0;
int months=0;
//????
}
any suggestions?