_day_of_week

Returns the day of week (1 to 7), where 1 is the first day of the week as indicated by the second parameter (1 to 7, 1 being Monday and 7 being Sunday). Note that in ISO 8601 standard, a week begins with Monday being day 1.

Syntax

_day_of_week ( date_expression, integer ) 

Example

_day_of_week ( 2003-01-01 , 1 )

Result

3