Release 10.1A: OpenEdge Data Management:
SQL Reference

> ## WEEK

> Returns the week of the year as a short integer value in the range of 1–53.

> #### Syntax

>     WEEK ( time_expression )

> Example

> The example illustrates the `WEEK` function. The query returns all columns from rows in the orders table where the `order_date` is in the fifth week of the year:

>     SELECT *
>         FROM orders
>         WHERE WEEK (order_date) = 5 ;

> #### 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`.

> ##### Compatibility

> ODBC compatible

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095