I'm trying to write a program to calculate monthly interest on a loan, adding interest on once a month based on the anniversary of the loan date. The first step to that is to calculate how many complete months have elapsed. Note that I need strict calendar months added so that, for a loan issued on 21 April, the interest will accrue on the 21st of every month allowing for different length months, I can't just use a fixed interval like 30 days unfortunately.

I'm trying to use DateDiff like this:

ElapsedMonths = DateDiff("m", StartDate, Now())
What I expected to happen with StartDate being set to 21/04/2019 is ElapsedMonths to return 0 until 20/05/2019 and then increment to 1 on 21/05/2019, 2 on 21/06/2019 etc.

However with that code it is incrementing on the 1st of the month so I'm getting 0 until 30/04/2019, then 1 on 01/05/2019 and 2 on 01/06/2019.

It seems to just be using the month property of StartDate rather than the full date for the calculation. I'm sure I'm missing something simple but I've been playing with this for ages and got nowhere!