Focal Point
[SOLVED] Calculate Date in 5, 10, 15, 20 years Increment

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/7867094495

November 29, 2010, 12:26 PM
joykairos
[SOLVED] Calculate Date in 5, 10, 15, 20 years Increment
I ordered "(Almost) 1001 Ways to Work with Dates in WebFocus" but in the meantime, I would like to know how you calculate the anniversary date (MDYY format) in 5, 10, 15, 20 etc. increment from the Start Date (MDYY Format). Can anybody show me how? I would appreciate it greatly! I use WebFocus 8.

Thanks,
joykairos

This message has been edited. Last edited by: Kerry,


WebFocus Managed Reporting, Developer Studio
November 29, 2010, 01:27 PM
GamP
Something like this perhaps? There may be more than this one method ...
DEFINE FILE CAR
NOW/MDYY = '&MDYY';
ANNIV1/MDYY = DATEADD(NOW,'Y',5);
ANNIV2/MDYY = DATEADD(NOW,'Y',10);
ANNIV3/MDYY = DATEADD(NOW,'Y',15);
ANNIV4/MDYY = DATEADD(NOW,'Y',20);
ANNIV5/MDYY = DATEADD(NOW,'Y',25);
END

TABLE FILE CAR
PRINT NOW ANNIV1 ANNIV2 ANNIV3 ANNIV4 ANNIV5
BY COUNTRY
BY CAR
END



GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
November 29, 2010, 02:22 PM
joykairos
Thanks GamP! I am newbie so thanks for the tip!


WebFocus Managed Reporting, Developer Studio