Ir al contenido
Menú
Se marcó esta pregunta
2 Respuestas
2423 Vistas

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
Descartar
Mejor respuesta

Hello,

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



Avatar
Descartar
Autor

works perfectly. thanks!

Mejor respuesta

Hi,

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


Hope it helps

Avatar
Descartar
Autor

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

Publicaciones relacionadas Respuestas Vistas Actividad
1
ene 21
8664
2
jul 20
4683
1
sept 19
13178
2
oct 19
12705
3
jun 25
831