Skip to main content
Version: I2025.7.x

WeekStartDate

Given the input date, returns the date of the first day of the week. This function is equivalent to the expression DateAdd("d", -1 * (Weekday(Now(), 'vbSunday')-1), Now()).

Syntax​

WeekStartDate(Date, [vbWeekStartDayConst])

Parameters​

Date
The date to use for the calculation.

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 start date for 2008-06-09:

[DateCustom].[StandardWeek].[Week].&[`WeekStartDate("2008-06-09T12:30:10", "vbSunday")`]