How can I format date in Odoo 10 QWeb report?

user5256523 picture user5256523 · Dec 15, 2016 · Viewed 19.3k times · Source

t-field-option is not working.

I have tried

<span t-field="o.date_invoice" t-field-options='{"format": "MM/dd/yyyy"}'/>

Answer

Perino picture Perino · Nov 20, 2018

Instead of using

<span t-field="o.date_invoice" t-field-options='{"format": "MM/dd/yyyy"}'/>

use

<span t-field="o.date_invoice" t-options='{"format": "MM/dd/yyyy"}'/>

Hope that helps!