How to calculate the difference in months between two dates in C#?
Is there is equivalent of VB\'s DateDiff() method in C#. I need to find difference in
DateDiff()
This worked for what I needed it for. The day of month didn't matter in my case because it always happens to be the last day of the month.
public static int MonthDiff(DateTime d1, DateTime d2){ int retVal = 0; if (d1.Month