Release 10.1A: OpenEdge Development:
Progress 4GL Reference

> ## MONTH function

> Evaluates a date expression and returns a month integer value from 1 to 12, inclusive.

> #### Syntax

>     MONTH ( date )

>     MONTH ( datetime-expression )

> ``date``

> A date expression where you want a month value.

> ``datetime-expression``

> An expression that evaluates to a DATETIME or DATETIME-TZ. The MONTH function returns the month of the date part of the DATETIME or DATETIME-TZ value.

> Example

> This procedure displays all the orders that have a promise-date in a month that has passed, and whose ship-date field is the Unknown value (`?`), which is the initial value of the ship-date field:

> r-mon.p
>     FOR EACH order:
>         IF (MONTH(promise-date) < MONTH(TODAY) OR
>            YEAR(promise-date) < YEAR(TODAY)) AND ship-date = ?
>         THEN DISPLAY order-num LABEL "Order Num" po LABEL "P.O. Num"
>                      promise-date LABEL "Promised By"
>                      order-date LABEL "Ordered" terms
>                      WITH TITLE "These orders are overdue".
>     END.

> #### See also

> DATE function, DATE-FORMAT attribute, DATETIME function, DATETIME-TZ function, DAY function, ETIME function, ISO-DATE function, MTIME function, NOW function, TIME function, TIMEZONE function, TODAY function, WEEKDAY function, YEAR function, YEAR-OFFSET attribute

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