The date in my Invoice is currently showing as:
21/11/2014 16:59:15
I want to show just month something like this:
11
I tried using t-esc with strftime but that doesn't work:
<span t-esc="o.date_order.strftime('%m')" />
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
The date in my Invoice is currently showing as:
21/11/2014 16:59:15
I want to show just month something like this:
11
I tried using t-esc with strftime but that doesn't work:
<span t-esc="o.date_order.strftime('%m')" />
Hello
You can use as below:
<span t-esc="datetime.datetime.strptime(o.date_order, '%Y-%m-%d').strftime('%m')"/>Note: Date format must match with the format of the date_order.
Thanks
| 相关帖文 | 回复 | 查看 | 活动 | |
|---|---|---|---|---|
|
1
3月 17
|
3815 | |||
|
2
2月 24
|
5381 | |||
|
2
9月 24
|
3077 | |||
|
2
7月 23
|
8099 | |||
|
1
6月 23
|
5389 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.