تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
2445 أدوات العرض

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!

الصورة الرمزية
إهمال
أفضل إجابة

Hello,

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



الصورة الرمزية
إهمال
الكاتب

works perfectly. thanks!

أفضل إجابة

Hi,

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


Hope it helps

الصورة الرمزية
إهمال
الكاتب

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

المنشورات ذات الصلة الردود أدوات العرض النشاط
1
يناير 21
8677
2
يوليو 20
4691
1
سبتمبر 19
13179
2
أكتوبر 19
12711
3
يونيو 25
857