I am using c#.
I have a problem of finding the difference between 2 dates in terms of year,month and day.
For example Finding the difference of 2 dates(mm/dd/yy).
I used the following code
int year=date2.Year-date1.Year; int month=date2.Month-date1.Month; int day=date2.Day-date1.Day;
The output I am getting is
1 year 3 months 2 days.
But the actual output is
0 year 3 months 2 days.
How will I solve this?please help me..