Datetime Calculation on PSQL query Odoo
Odoo PSQL Query with Datetime Function
Probuse Admin
In your PSQL query you can write like:
(SELECT TRUNC(DATE_PART('day', now()::timestamp - ml.invoice_date ::timestamp))) as outstanding_day,
(SELECT TRUNC(DATE_PART('day', now()::timestamp - ml.invoice_date ::timestamp))) as outstanding_day,