Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odpovědi
2154 Zobrazení

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
Zrušit
Nejlepší odpověď

Hello,

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



Avatar
Zrušit
Autor

works perfectly. thanks!

Nejlepší odpověď

Hi,

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


Hope it helps

Avatar
Zrušit
Autor

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

Related Posts Odpovědi Zobrazení Aktivita
1
led 21
8387
2
čvc 20
4490
1
zář 19
12940
2
říj 19
12357
3
čvn 25
437