I'm trying to list employees whose termination date is within a range 6 months prior to the report date entered by the user, and employees whose disability date is within a range 12 months to 18 months prior to the report date entered by the user. The previous developer used the following formula that captured all data. I've tried variations of the formula without success. Any help you provide will be appreciated.
Local numberVar lastyearstart := Year ({?report date}) - 1;
Local numberVar monthstart := Month ({?report date});
Local numberVar daystart := Day ({?report date});
(({CODE} = "DIS" and
{EFF_DTE} < DateTime (lastyearstart, monthstart, daystart, 0, 0, 0))
OR
({CODE} = ["TRM"] and {EFF_DTE} < {?report date}))
Local numberVar lastyearstart := Year ({?report date}) - 1;
Local numberVar monthstart := Month ({?report date});
Local numberVar daystart := Day ({?report date});
(({CODE} = "DIS" and
{EFF_DTE} < DateTime (lastyearstart, monthstart, daystart, 0, 0, 0))
OR
({CODE} = ["TRM"] and {EFF_DTE} < {?report date}))