Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
2 Răspunsuri
2421 Vizualizări

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!

Imagine profil
Abandonează
Cel mai bun răspuns

Hello,

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



Imagine profil
Abandonează
Autor

works perfectly. thanks!

Cel mai bun răspuns

Hi,

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


Hope it helps

Imagine profil
Abandonează
Autor

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

Related Posts Răspunsuri Vizualizări Activitate
1
ian. 21
8660
2
iul. 20
4677
1
sept. 19
13176
2
oct. 19
12704
3
iun. 25
830