Hi everyone, I have a field of due days listed as below : How would i calculate in sas eg if due day in (30,31) then last paid date = 29FEB2020. this is the code i wrote : Data Test; Set Test_1; Format lastPaiDdate date9.; if DueDay >= today then lastPaiDdate = (MDY(month-1,DueDay,year)); else if DueDay < today then lastPaiDdate = (MDY(month,DueDay,year)); run; Table I want to create below : DueDay LastDatePaid 1 01-Feb-20 2 02-Feb-20 3 03-Feb-20 29 29-Feb-20 30 29-Feb-20 31 29-Feb-20
... View more