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

MONTHNAME

Returns a character string containing the name of the month (for example, January through December) for the month portion of date_expression. The argument date_expression can be the name of a column, the result of another scalar function, or a date or timestamp literal.

Syntax

MONTHNAME ( date_expression )

Example

In this example, which illustrates the MONTHNAME function, the query returns all rows where the name of the month in the order_date column is equal to ‘June':
SELECT *
FROM orders
WHERE order_no =346 and MONTHNAME(order_date)='JUNE';
ORDER_NO ORDER_DATE REFERENCE CUST_NO
------- --------- -------- -------
346 06/01/2003 87/rd 10002
1 record selected

Compatibility

ODBC compatible