Skip to Content
Menu
This question has been flagged
1 Reply
1385 Views

I just need the date on the reports, not the date and time. How can I do that? In odoo 9

Avatar
Discard
Best Answer

Hello Luis Rivas,

If Your field having datatype as datetime.

You could try specifying a format in t-field-options, like this:

<span t-field="object.datetimefield" t-field-options='{"format": "MMMM d y"}'/>

just adjust the format as you want.


OR 

<span t-esc="time.strftime('%m/%d/%Y',time.strptime(object.datetimefield,'%Y-%m-%d %H:%M:%S'))"/>

Avatar
Discard