Evaluates a date expression and returns a month INTEGER value from 1 to 12, inclusive.
This procedure displays all the Orders that have a PromiseDate in a month that has passed, and whose ShipDate field is the Unknown value (?), which is the initial value of the ShipDate field:
r-mon.p
FOR EACH Order NO-LOCK: IF (MONTH(Order.PromiseDate) < MONTH(TODAY) OR YEAR(Order.PromiseDate) < YEAR(TODAY)) AND Order.ShipDate = ? THEN DISPLAY Order.OrderNum LABEL "Order Num" Order.PO LABEL "P.O. Num" Order.PromiseDate LABEL "Promised By" Order.OrderDate LABEL "Ordered" terms WITH TITLE "These orders are overdue". END. |
ADD-INTERVAL function, DATE function, DATE-FORMAT attribute, DATETIME function, DATETIME-TZ function, DAY function, ETIME function, INTERVAL function, ISO-DATE function, MTIME function, NOW function, TIME function, TIMEZONE function, TODAY function, WEEKDAY function, YEAR function, YEAR-OFFSET attribute