WeekEndDate
Given the input date, returns the date of the last day of the week. This
function is equivalent to the expression
DateAdd("d", -7, WeekStartDate(Now(), 'vbSunday'))
.
Syntax
WeekEndDate(Date, [vbWeekStartDayConst])
Parameters
Date
The date to return the week end date for.
vbWeekStartDayConst
Optional. String constant indicating the first day of the week (Sunday,
Monday, and so on). This parameter supports the following values:
vbUseSystem
vbSunday
vbMonday
vbTuesday
vbWednesday
vbThursday
vbFriday
vbSaturday
If no value is provided, this parameter defaults to vbSunday
.
Example
The following expression returns the week end date for 2008-06-09, with the first day of the week set to Sunday:
[DateCustom].[StandardWeek].[Date].&[`CInt(Format(WeekEndDate("2008-06-09T12:30:10", "vbSunday"),"yyyymmdd"))`]