Skip to main content

Functions to determine the months between two dates and for the years separately

month and years elapsed between two dates?2021-10-20 - 2018-09-30 =? Years2021-10-20 - 2018-09-30 =? month

Brian Element Thu, 12/30/2021 - 09:06

You don't mentioned how detailed you want this to be.  For the year is it just the years or are you interested in partial years?  If it is just years it is simple:

@year(Date1) - @year(Date2) 

In your case it would be 3.

For the month are you just interested in the month?  If so replace the @year for @month and you will get the result.  If you want to include the years as months then you would have to also use the @year and multiple by 12 plus a bit of logic for the first and last years.

The website encountered an unexpected error. Try again later.