콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
2582 화면

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
1월 21
8771
2
7월 20
4782
1
9월 19
13267
2
10월 19
12827
3
6월 25
1025