Berserk Docs
Scalar FunctionsDate & Time Functions

startofmonth

Returns the start of the month for the given datetime.

Syntax

startofmonth(date, offset)

Parameters

Prop

Type

Returns: datetime

Examples

Example 1 — Start of the month the longships reached Northumbria

print startofmonth(datetime(2024-06-08))
print_0 (datetime)
2024-06-01T00:00:00Z

On this page