Skip to Content
Menu
This question has been flagged
2 Replies
2009 Views

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
Discard
Best Answer

Hello,

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



Avatar
Discard
Author

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
Discard
Author

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

Related Posts Replies Views Activity
1
Jan 21
8236
2
Jul 20
4372
1
Sep 19
12836
2
Oct 19
12218
0
Jan 24
1038