I need to return the exact difference between two dates in the form of a string.
If the dates are 01-FEB-2012 and 01-FEB-2014, the function should return “2 years“.
If the dates are 01-FEB-2012 and 01-MAR-2014, the function should return “25 months“.
If the difference is not in exact years or months, it should return the difference in days.
I do not want to use DateDiff from the Visual Basic namespace so the code is portable to C#.
1 Answer