Syntax

DAY_OF_WEEK(Argument)

 

Description

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:

Example

Assume ORDER_DATE is February 15, 2003

 

DAY_OF_WEEK(ORDER_DATE) returns 6.

 

List of SQL scalar functions by topic

 

↑ Top of page