Try OpenEdge Now
skip to main content
SQL Reference
SQL Reference : OpenEdge SQL Functions : MONTH
 

MONTH

Returns the month in the year specified by the argument as a short integer value in the range of 1-12.

Syntax

MONTH ( date_expression )

Notes

*The argument to the function must be of type DATE.
*If date_expression is supplied as a time 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

This example illustrates the MONTH function:
SELECT * FROM orders WHERE MONTH (order_date) = 6 ;

Compatibility

ODBC compatible