コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
2521 ビュー

Hi. I am working with Odoo enterprise web 16.4+e

In my QWeb report, I have a field that getting datetime from Attendance like this:

Currently it is showing 12/03/2024 17:30:10

How can I only show time like 17:30:10 ?

Thanks in advance!

アバター
破棄
最善の回答

Hello,

 <span t-esc="context_timestamp(YOUR_FIELD).strftime('%H:%M:%S')"/>



アバター
破棄
著作者

works perfectly. thanks!

最善の回答

Hi,

If the field is a Datetime field you can use your_field.strftime.('%H:%M:%S)


Hope it helps

アバター
破棄
著作者

thanks! but in my case, Sahar's answer is more acceptable

関連投稿 返信 ビュー 活動
1
1月 21
8743
2
7月 20
4752
1
9月 19
13244
2
10月 19
12800
3
6月 25
963