DAY_OF_WEEK(Argument)
The DAY_OF_WEEK SQL scalar function returns an integer between 1 and 7 that represents the day of the week, where 1 represents Monday.
The argument must be a date, or a timestamp.
The result of the function is an integer.
If the argument can be null, the result can be null; if the argument is null, the result is the null value.
Note the following peculiarities:
With SQL Server, the ISO implementation is forced by using the "SET DATEFIRST 1" option.
With ODBC, the result cannot be guaranteed, as the implementation of the function can vary according to the destination DBMS.
Assume ORDER_DATE is February 15, 2003
DAY_OF_WEEK(ORDER_DATE) returns 6.
List of SQL scalar functions by topic