Main Content
months
(Not recommended; use between
) Number of whole months between
dates
months
is not recommended. Use the between
function instead because it accepts datetime
values as inputs. For
more information on updating your code, see Version History or Replace Discouraged Instances of Serial Date Numbers and Date Strings.
Description
returns the number of whole months between MyMonths
= months(___,EndMonthFlag
)StartDate
and
EndDate
using an optional argument for
EndMonthFlag
. If EndDate
is earlier
than StartDate
, MyMonths
is
negative.