A customer wants an SAP Business One query that will show the days between the currentdate of invoice to the date the invoice was created?
I tried this query but it did not work.
SELECT DAYS_BETWEEN(TO_DATE(T0."DocDate", 'YYYY-MM-DD' , TO_DATE(CURRENT DATE(), 'YYYY-MM-DD') AS "Days_Between" FROM OINV T0;
Your Urgent assistance on how to work on the above query for it to work will be appreciated.