Returns the Day of the ISO Week, based on ISO 8601 standards, as a short integer value in the range of 1-7.

Syntax

ISOWEEKDAY ( time_expression )

Notes

  • The argument to the function must be of type DATE.
  • If date_expression is supplied as a date literal, it can be any of the valid date_literal formats where the day specification (DD) precedes the month specification (MM).
  • The result is of type SHORT.
  • If the argument expression evaluates to NULL, the result is NULL.

Example

The query returns all columns from rows in the orders table where the order_date is in the fifth day of the ISO week. The following examples illustrate the ISOWEEKDAY function:

SELECT *
    FROM orders
    WHERE ISOWEEKDAY (order_date) = 5 ;      

Compatibility

ODBC compatible