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

First Day Of Week In Month Function
Dates Times Class

Public Function FirstDayOfWeekInMonth( _
      ByVal vYear As Variant _
    , ByVal vMonth As Variant _
    , ByVal vDayOfWeek As Variant _
    ) As Variant

Returns the first day of the week (for example, the first Tuesday) in the specified month.

Examples:
    Weekday(#1/1/96#) = vbMonday
    FirstDayOfWeekInMonth(1996, 1, vbMonday) = #1/1/96#
    FirstDayOfWeekInMonth(1996, 1, vbFriday) = #1/5/96#
    FirstDayOfWeekInMonth(1996, 1, vbSunday) = #1/7/96#
See also:
    LastDayOfWeekInMonth Function
    NthDayOfWeekInMonth Function
    FirstDayOfMonth Function
    FirstWeekdayOfMonth Function
    FirstDayOfPeriod Function
vYear: Must use the full four-digit year; cannot use 96, for example, to mean 1996. Function returns Null if vYear is Null or cannot be interpreted as an integer number.
vMonth: Month in the year vYear. Function returns Null if vMonth is Null or cannot be interpreted as an integer number.
vDayOfWeek: One of the vbDayOfWeek constants like vbSunday, vbMonday, etc. Function returns Null if vDayOfWeek is Null or cannot be interpreted as an integer number.
v2.0 Addition: This function is new to this version of Entisoft Tools.

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