Skip to main content
Version: I2024.2.x

PrevWeekStartDate

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

Syntax

PrevWeekStartDate(Date, [vbWeekStartDayConst])

Parameters

Date
The date to return the previous week's start 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 previous week's start date for 2008-06-09, with the first day of the week set to Sunday.

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