```Hi all, I tried every syntax even on the old m...
# suiteql
k
Copy code
Hi all,

I tried every syntax even on the old messages here and I found online and still can't get this to work.. I was trying to subtract the current date from our custom field..
SYSDATE or CURRENT_DATE - 1 will work but when I substitute '1' with our custom field, and any of the following doesn't work..

(sysdate - customer.custentity_date_lsa) AS "Date Difference"
(sysdate - TO_CHAR(customer.custentity_date_lsa, 'YYYY-MM-DD HH24:MM:SS')) AS "Date Difference"
etc..

Could anyone show me how you guys subtract dates?
Nvm, I mange to make it work with the following:
Copy code
CEIL(sysdate - TO_DATE(TO_CHAR(customer.custentity_date_lsa, 'YYYY-MM-DD'), 'YYYY-MM-DD'))