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

First Day Of Week Function
Dates Times Class

Public Function FirstDayOfWeek( _
    ByVal vDate As Variant _
    ) As Variant

Returns the first day of the week (the first Sunday) for the given date.
Returns vDate if it is already the first day of the week.

Examples:
    FirstDayOfWeek(#1/13/96#) = #1/7/96#
    FirstDayOfWeek(#1/14/96#) = #1/14/96#
    FirstDayOfWeek(#1/15/96#) = #1/14/96#
    FirstDayOfWeek(#1/20/96#) = #1/14/96#
    FirstDayOfWeek(#1/21/96#) = #1/21/96#
See also:
    LastDayOfWeek Function
    FirstDayOfMonth Function
    FirstWeekdayOfMonth Function
    FirstDayOfWeekInMonth Function
    FirstDayOfPeriod Function
vDate: The date used to determine the week whose first day is returned. Function returns Null if vDate 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.