LASTXDAYS

Get the date interval for the last X days.

Parameter List

Syntax
LASTXDAYS(days
[include_today]
)
days

The number of days counting backward from today.

[optional] include_today

Determines whether the current day should be included in the returned date range. If FALSE (default), the range ends yesterday. If TRUE, the range ends today. In both cases, the total length of the range is exactly N days.

Examples

LASTXDAYS(10, FALSE) returns [2021-05-01;2021-05-10]