LASTXWEEKS

Get the date interval for the last X weeks. The first day of the range is a Sunday and the last date is a Saturday.

Parameter List

Syntax
LASTXWEEKS(weeks
[include_current]
)
weeks

The number of weeks counting backward from last sunday.

[optional] include_current

Determines whether the current week should be included in the returned date range. If FALSE (default), only fully completed weeks are counted. If TRUE, the current (possibly partial) week is included. In both cases, the total length is exactly N weeks.

Examples

LASTXWEEKS(1, FALSE) returns [2021-05-02;2021-05-08]