Skip to Content
Menu
This question has been flagged
2 Replies
2470 Rodiniai

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!

Portretas
Atmesti
Best Answer

Hello,

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



Portretas
Atmesti
Autorius

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

Portretas
Atmesti
Autorius

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

Related Posts Replies Rodiniai Veikla
1
saus. 21
8722
2
liep. 20
4712
1
rugs. 19
13186
2
spal. 19
12737
3
birž. 25
889