23.10.2012 Views

Openedge Data Management: SQL Reference - Product ...

Openedge Data Management: SQL Reference - Product ...

Openedge Data Management: SQL Reference - Product ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

DAYOFWEEK<br />

Notes • The date_expression argument must be of type DATE.<br />

DAYOFWEEK<br />

Syntax<br />

92<br />

SELECT *<br />

FROM orders<br />

WHERE DAYOFMONTH (order_date) = 14 ;<br />

• If date_expression is supplied as a date literal, it can be any of the valid date_literal<br />

formats where the day specification (DD) precedes the month specification (MM).<br />

• The result is of type SHORT.<br />

• If the argument expression evaluates to NULL, the result is NULL.<br />

Compatibility<br />

ODBC compatible<br />

Returns the day of the week in the argument as a short integer value in the range of 1–7.<br />

The argument date_expression can be the name of a column, the result of another scalar<br />

function, or a date or timestamp literal.<br />

DAYOFWEEK ( date_expression )<br />

Example The following example shows how to use the DAYOFWEEK function:<br />

SELECT *<br />

FROM orders<br />

WHERE DAYOFWEEK (order_date) = 2 ;<br />

Notes • The argument to the function must be of type DATE.<br />

• If date_expression is supplied as a date literal, it can be any of the valid date_literal<br />

formats where the day specification (DD) precedes the month specification (MM).<br />

• The result is of type SHORT.<br />

• If the argument expression evaluates to NULL, the result is NULL.<br />

Compatibility<br />

ODBC compatible

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!