Berserk Docs
Scalar FunctionsDate & Time Functions

startofweek

Returns the start of the week for the given datetime.

Syntax

startofweek(date, offset)

Parameters

Prop

Type

Returns: datetime

Examples

Example 1 — Start of the week Rollo besieged Chartres

print startofweek(datetime(2024-07-20))
print_0 (datetime)
2024-07-14T00:00:00Z

On this page