MonthsBetween
Computes the approximate number of months between two points in time.
Syntax
-
MonthsBetween(t, s)
-
t
ands
are datetime structures or timestamps
-
Description
If t
and s
are DateTime
structures or timestamps, then MonthsBetween(t, s)
returns the (in general non-integral) approximate number of months between t
and s
, irrespective of the order of t
and s
, based on the assumption that one month is 30.4375 days.
Examples
MonthsBetween(date(1980, 05, 20), date(2000, 05, 20))
240