OK, right, you wanted month and I gave you years.
I did not re-test this formula, but see if it works
'var date SD=[start date];
var date ED=[end date];
(Year($ED)-Year($SD)-1)*12 // start off with 12 times the number of fully completed years
+If(Month($ED)>=Month($SD),12,0) //add 12 months if the last year was fully completed
+ If((Month($ED)>=Month($SD)),Month($ED)-Month($SD),12+Month($ED)-Month($SD)) // add the number of months between the month numbers.
-If(Day($ED)<Day($SD),1,0) // but if the day did not catch up to the start date's day number, then subtract 1.
------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.commark.shnier@gmail.com------------------------------
Original Message:
Sent: 10-26-2020 11:01
From: Eric Fixler
Subject: Month between 2 dates calculation
Mark; This look good, but provides me the Term in years. How would you suggest I convert that to months?
------------------------------
Eric Fixler
Original Message:
Sent: 10-22-2020 16:58
From: Mark Shnier (YQC)
Subject: Month between 2 dates calculation
Try this,
var date Origination = [Origination Date];
var date Maturity = [Maturity Date];
Year($Maturity) - Year($Origination)
-
If(
Month($Maturity) < Month($Origination)
or
(Month($Maturity) = Month($Origination) and Day($Maturity) < Day($Origination)),1,0)
------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
mark.shnier@gmail.com
Original Message:
Sent: 10-22-2020 16:01
From: Eric Fixler
Subject: Month between 2 dates calculation
I am looking for some help on a formula.
I have a loan with an origination date and a maturity date - they are both in Date Field format
I am looking to extract the number of whole months between the two dates.
Example
Origination Date: 1/1/2009
Term In months: ????
Maturity Date: 1/1/2019
We are looking for 120 months in the Term Field
Thank you
E
------------------------------
Eric
------------------------------