<-- Previous || Up || Next -->

End Of Add Months Function
Dates Times Class

Public Function EndOfAddMonths( _
      ByVal vDate As Variant _
    , ByVal vMonths As Variant _
    ) As Variant

Return the last day of the month after adding a number of months to the given date.

    EndOfAddMonths(#1/15/99#,  1) = #2/28/99#
    EndOfAddMonths(#1/15/99#,  2) = #3/31/99#
    EndOfAddMonths(#1/15/99#,  5) = #6/30/99#
    EndOfAddMonths(#1/15/99#, -2) = #11/30/98#
See also:
    EndOfAddMonthsTest Subroutine
    AddMonths Function
    LastDayOfMonth Function
    EOMONTH Function (Microsoft Excel)
vDate: The date to which a number of months are added according to vMonths. Function returns Null if vDate is Null or cannot be interpreted as a Date.
vMonths: The number of months to add to the date vDate. vMonths is truncated to a long integer number. Function returns Null if vMonths is Null or cannot be interpreted as a Long Integer number.
Note: This function returns the exact same results as the EOMONTH function in Microsoft Excel.
v2.0 Addition: This function is new to this version of Entisoft Tools.

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.