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

Last Day Of Period Function
Dates Times Class

Public Function LastDayOfPeriod( _
      ByVal vDate As Variant _
    , ByVal vPeriod As Variant _
    ) As Variant

Return the last day of the period (for example, the last day of the quarter), given a date within the period and the number of periods per year.

Examples:
    LastDayOfPeriod(#1/15/99#, 1) = #12/31/99#
    LastDayOfPeriod(#1/15/99#, 2) = #6/30/99#
    LastDayOfPeriod(#1/15/99#, 4) = #3/31/99#
    LastDayOfPeriod(#1/15/99#, 6) = #2/28/99#
    LastDayOfPeriod(#1/15/99#, 12) = #1/31/99#
See also:
    FirstDayOfPeriod Function
    LastDayOfMonth Function
    LastWeekdayOfMonth Function
    LastDayOfWeek Function
    NextCouponDate Function
vDate: The date used to determine the period. Function returns Null if vDate is Null or cannot be fixed up to a Date.
vPeriod: The number of periods per year. Use 1 for an annual period, 2 for semi-annual, 3 for four-month period, 4 for quarterly, 6 for bi-monthly, and 12 for monthly. vPeriod must be one of these numbers or else the function will return unpredictable results. Function returns Null if vPeriod is Null or cannot be fixed up to a Date.
v2.0 Addition: This function is new to this version of Entisoft Tools.

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