Hi,
A report needs to run every 6 months in the past from todays date.
So were in Month 09 (sept) so If I ran the report today i should get the output for the last 6 months
02 04 05 06 07 08.
and then i would like it to be displayed in my temp-table
The code I am is caclulating the future - how can i calculate the past?
DEFINE VARIABLE daDate AS DATE NO-UNDO.
DEFINE VARIABLE iLoop AS INTEGER NO-UNDO.
DEFINE VARIABLE chDateRange AS CHARACTER NO-UNDO.
ASSIGN
daDate = DATE(TODAY).
DO iLoop = 1 TO (1 * 6):
chDateRange = chDateRange + STRING( ADD-INTERVAL(daDate,iLoop,'months'),'99/99/9999') + ' '.
END.
ASSIGN (TEMP TABLE)
A report needs to run every 6 months in the past from todays date.
So were in Month 09 (sept) so If I ran the report today i should get the output for the last 6 months
02 04 05 06 07 08.
and then i would like it to be displayed in my temp-table
The code I am is caclulating the future - how can i calculate the past?
DEFINE VARIABLE daDate AS DATE NO-UNDO.
DEFINE VARIABLE iLoop AS INTEGER NO-UNDO.
DEFINE VARIABLE chDateRange AS CHARACTER NO-UNDO.
ASSIGN
daDate = DATE(TODAY).
DO iLoop = 1 TO (1 * 6):
chDateRange = chDateRange + STRING( ADD-INTERVAL(daDate,iLoop,'months'),'99/99/9999') + ' '.
END.
ASSIGN (TEMP TABLE)