Skip to Content
Menu
This question has been flagged
2 Replies
2437 Zobrazenia

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šiť
Best Answer

Hello,

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



Avatar
Zrušiť
Autor

works perfectly. thanks!

Best Answer

Hi,

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


Hope it helps

Avatar
Zrušiť
Autor

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

Related Posts Replies Zobrazenia Aktivita
1
jan 21
8670
2
júl 20
4688
1
sep 19
13179
2
okt 19
12707
3
jún 25
842