How can I compare two dates to calculate how many full months have passed.
I have a date “2022-02-16” the other can be “2022-03-16” in this scenario 1 full month has passed but if the second date is “2022-03-15” then 0 full month has passed.
and again if it was “2022-02-16” the other can be “2022-04-16” then it would be two full months.
@raja.arslankhan Hi thanks for this but it doesn’t work for me because if i do DateDiff(DateInterval.Month, Convert.ToDateTime( “2016-01-30”),Convert.ToDateTime(“2016-05-29”)) it should return 3 as it hasn’t been 4 full months. Do you know how to have a compare function that compares the days with the months also to ensure a full month has passed