Equinox Online Help - Language Reference - A to Z

Home

Months

Applies to
SyntaxMonths(Date1Expression, Date2Expression)
Action[Function] Returns the number of calendar months between two dates.
ScopeUsable anywhere.
Notes

The function returns the number of whole calendar months between Date1Expression and Date2Expression (Date2Expression minus Date1Expression).

CategoryDate handling
See Also Years, Year, Day, Dayname, Dayofweek, Dayofyear, Dmy, Dmyadd, Leapyear, Month, MonthName, ServerDateTime, Today, Week, WeekOfYear, WeekStart
Example

This example calculates the number of months since an invoice was issued and stores the result in the variable DebtAge.

DebtAge = Months(InvoiceDate, Today)