APPX Software Library

Chapter 4-6: ILF Keyword Reference

SET MNTH

The SET MNTH statement extracts the month of the year from a date/time field.

Screen capture

(1) T/F execution conditions
(2) Destination application ID
(3) Destination field name or PDF
(4) Destination occ (constant/index)
(5) Type (S=short name, L=long name)
(6) Source application ID
(7) Source field name, PDF, or constant
(8) Source occurrence (constant/index)

Using the Statement

If the type (item 5) is S (short), the result is returned in the destination field as three characters (for example, 'Sep'). If the type is L (long), the result is returned in the destination field as up to nine characters (for example, 'September'). If the source field is blank, the destination field is set to blank.

Restrictions

The destination must be an alpha field type and the source must be a Gregorian date/time field type with at least the month part.

Execution Errors

A non-recoverable error occurs at runtime if the source field does not include the month part.

Related Statements

SET, SET DATE, SET DAY

Example

The following example with TAR WORK FISCAL MONTH set to the first month of the accounting year. The routine then retrieves and displays all the months in a year beginning with that start month.

Screen capture