İçereği Atla
Menü
Bu soru işaretlendi
2 Cevaplar
2461 Görünümler

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!

Avatar
Vazgeç
En İyi Yanıt

Hello,

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



Avatar
Vazgeç
Üretici

works perfectly. thanks!

En İyi Yanıt

Hi,

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


Hope it helps

Avatar
Vazgeç
Üretici

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

İlgili Gönderiler Cevaplar Görünümler Aktivite
1
Oca 21
8704
2
Tem 20
4700
1
Eyl 19
13183
2
Eki 19
12724
3
Haz 25
872