add toStartOfWeek function · Issue #36 · ClickHouse/ClickHouse · GitHub
Skip to content

add toStartOfWeek function #36

Description

@blackbass1988

Hi!

Can you add toStartOfWeek function?

Behavior of this function is similar to toStartOfMonth,
but I want that function returns truncated to monday's date.

example :

toStartOfWeek(2016-06-28, 0) -> 2016-06-26
toStartOfWeek(2016-06-23, 1) -> 2016-06-20

here is first argument is a date
second argument is a first day week (sunday, monday ...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions