Calculating Date Difference in Days

KituiKitui Member Posts: 9
Iam doing a report that classifies loans based on the last payment day and today.If last payment day is less than a month it is classified as performing.Did the following code but an error pops 'Date is Invalid' when i run the report.

Day1:=DATE2DMY("Last Pay Date",1);
Month1:=DATE2DMY("Last Pay Date",2);
Year1:=DATE2DMY("Last Pay Date",3);

Day2:=DATE2DMY(TODAY,1);
Month2:=DATE2DMY(TODAY,2);
Year2:=DATE2DMY(TODAY,3);
IF (Year1=Year2) AND ((Month2-Month1)<=1) AND (( Day2-Day1)<30) THEN
"Loans Register"."Loans Category":="Loans Register"."Loans Category"::Perfoming
ELSE

Best Answers

Answers

  • KituiKitui Member Posts: 9
    And if i setfilter where last pay day isnt nill.
Sign In or Register to comment.