Cambridgehomes
IS-IT--Management
Below is a formula w are using, but we are having a problem with the code failing on leap year. Does anyone have a work around code to correct this problem
NumberVar YYYY;
NumberVar MM;
NumberVar DD;
YYYY := Truncate({WDWB1.WDA004} / 10000);
MM := Truncate(({WDWB1.WDA004} - (YYYY * 10000)) / 100);
DD := Truncate(({WDWB1.WDA004} - ( YYYY * 10000)) - (MM * 100));
local datevar LTM := Date(YYYY,MM,DD);
//record selection formula
LTM in Date(year(CurrentDate)-1,mm,dd) to (currentdate)
NumberVar YYYY;
NumberVar MM;
NumberVar DD;
YYYY := Truncate({WDWB1.WDA004} / 10000);
MM := Truncate(({WDWB1.WDA004} - (YYYY * 10000)) / 100);
DD := Truncate(({WDWB1.WDA004} - ( YYYY * 10000)) - (MM * 100));
local datevar LTM := Date(YYYY,MM,DD);
//record selection formula
LTM in Date(year(CurrentDate)-1,mm,dd) to (currentdate)