Home / Search/ Language Reference/ Functions/ Scalar Functions/ DateTime Functions/dayofweek

dayofweek

The dayofweek function returns an integer between 0 and 6 representing the day of the week, beginning on Sunday.

This differs from the standard Kusto dayofweek function, which returns a timespan.

Syntax

    dayofweek( Date )

Arguments

Returns

The timespan since midnight at the beginning of the preceding Sunday, rounded down to an integer number of days.

Example

  • dayofweek(datetime(2015-12-14)) returns as 1d.