Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
2429 Visualizzazioni

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
Abbandona
Risposta migliore

Hello,

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



Avatar
Abbandona
Autore

works perfectly. thanks!

Risposta migliore

Hi,

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


Hope it helps

Avatar
Abbandona
Autore

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

Post correlati Risposte Visualizzazioni Attività
1
gen 21
8665
2
lug 20
4685
1
set 19
13178
2
ott 19
12706
3
giu 25
836