A quick example of date manipulations: * ------------------------------------------------------------------ * * Procedure - EndOfMonth * * Description - Receive a date and return the last day of the month * * Input - InputDate(8,0) in CCYYMMDD format * * Output - Date set to last day of month * * ------------------------------------------------------------------ * p EndOfMonth b Export d EndOfMonth pi d DatFmt(*ISO) d InputDate d Const DatFmt(*ISO) d NextMth s d DatFmt(*ISO) d nDay s 5i 0 d EndDate s d c test(e) InputDate c if %error c return *loval c endif c InputDate adddur 1:*Months NextMth c extrct NextMth:*Days nDay c NextMth subdur nDay:*Days EndDate c return EndDate p EndOfMonth e