Hello,
I have this in odoo 10, how can i have the same thing in odoo 12?
<span t-esc="time.strftime('%d-%m-%Y', time.strptime(ddt.date,'%Y-%m-%d %H:%M:%S'))"
style="color:{{style.cust_color}};"/>
Thanks.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hello,
I have this in odoo 10, how can i have the same thing in odoo 12?
<span t-esc="time.strftime('%d-%m-%Y', time.strptime(ddt.date,'%Y-%m-%d %H:%M:%S'))"
style="color:{{style.cust_color}};"/>
Thanks.
Hi Giusy, in version 12 the datetime field are python Date object, you don't have to use
strptime.
I solved with <span t-esc="o.date_invoice.strftime('%d/%m/%Y')"/>
My problem is that I have to format the date in qweb ... I need to have the format day / month / year .. how can I do?
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up
Please use a meaningful title.
Convert datetime.date to datetime.datetime: https://goo.gl/VNJgWS