Openerp 如何获取部分日期qweb odoo

Openerp 如何获取部分日期qweb odoo,openerp,qweb,Openerp,Qweb,我的发票中的日期当前显示为: 2014年11月21日16:59:15 我只想展示这样的东西: 十一, 我尝试将t-esc与strftime一起使用,但不起作用: <span t-esc="o.date_order.strftime('%m')" /> 试试: 更多信息。试试这个 <span t-esc="datetime.datetime.strptime(o.sale_id.confirmation_date, '%Y-%m-%d %H:%M:%S').strftim

我的发票中的日期当前显示为:

2014年11月21日16:59:15

我只想展示这样的东西:

十一,

我尝试将t-esc与strftime一起使用,但不起作用:

<span t-esc="o.date_order.strftime('%m')" />

试试:


更多信息。

试试这个

<span t-esc="datetime.datetime.strptime(o.sale_id.confirmation_date, '%Y-%m-%d %H:%M:%S').strftime('%B %d,%Y')"/>

我的输出是:2018年5月28日


希望,它会被使用。

这实际上并没有回答这个问题-OP希望这个月作为一个开始的数字。