Hi, this is my query.
I calculate difference of 20 days from pDate(Process Date) form today.
But I want if rfDate(Resubmitted date) it will count from rfdate and ignore Pdate.
SELECT *
FROM `lims_payment`
WHERE TO_DAYS( NOW( ) ) - TO_DAYS( `pDate` ) >20
AND rfDate LIKE '0000-00-00'