LastDateOfDayInQuarter

Syntax:

LastDateOfDayInQuarter(dateexpr, NumZ{day})

Description:
Returns the date of the last instance of the specified day in the quarter of the date specified.  For example, this function could return the date of the last Monday of the next quarter.

Parameter Description

dateexpr A the date to be used when determining the last instance of the quarter.

NumZ{day}  The day to check for.

Example:

Sub Main
'return the date of the last Sunday of this quarter.
  lastSundayofthisquarter= LastDateOfDayInQuarter(Now(),1)

'return the date of the last Friday of next quarter.
  lastMondayofnextquarter = LastDateOfDayInQuarter(DateAdd(1,"q",Now()),6)



End
Sub

See Also:

IsLeapYear

FirstDateOfDayInMonth

FirstDateOfDayInQuarter

FirstDateOfDayInYear

LastDateOfDayInMonth

LastDateOfDayInYear

LastDateOfWeek

LastDayOfMonth

LastDayOfQuarter

LastDayOfYear