Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
9135 Переглядів

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

Аватар
Відмінити

Thank you, Sudhir Sir.

+1 from me.

thanks

Related Posts Відповіді Переглядів Дія
1
бер. 17
3215
2
лют. 24
5381
2
вер. 24
1895
2
лип. 23
6275
1
черв. 23
4304