Difference / number of days between 2 dates

Hi all,

I would like to know the day between 2 dates but using the PQL “DAYS_BETWEEN” it is not working.

I need to know how many day passed between a creation of anagrafic vendor (“LFA1”.“ERDAT”) and creation PO (“EKKO”.“AEDAT”), an between creation of anagrafic vendor (“LFA1”.“ERDAT”) and invoice (“RBKP”.“CPUDT”).

Thank you

Laura