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

Add Months Function
Dates Times Class

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

Add a number of months to the given date.

    AddMonths(#1/15/99#,  1) = #2/15/99#
    AddMonths(#1/31/99#,  1) = #2/28/99#
    AddMonths(#4/30/99#,  1) = #5/30/99#
    AddMonths(#4/30/99#, -2) = #2/28/99#
See also:
    AddMonthsTest Subroutine
    EndOfAddMonths Function
    EDATE 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 EDATE 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.