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

I have this code:

                                />, what I am doing is importing the create_date to my qweb, I have to put the date widget because if I delete it, the date is printed one hour ago, and it prints me with the format 01/01/2022, which What I want to do is change the format type from qweb to November 17, 2022, and I'm trying this way:

                                   /> but in the end it gives me this error: ValueError: time data 'November 17, 2022 06:03' does not match format '%Y-%m-%d %H:%M:%S', Is there a way to be able to change the format type in the create_date without having to remove the widget from qweb? or from python? I would appreciate your help. Odoo 14 community

아바타
취소

Looks like below:

<p>Dated this <span class="" t-esc="doc.task_id.apply_date.strftime('%d')"/> day of <span class="" t-esc="doc.task_id.apply_date.strftime('%B %Y')"/></p>

베스트 답변

Hi,

try this code

<t t-esc="doc.date_order.strftime('%B %m %Y')"/>


아바타
취소
관련 게시물 답글 화면 활동
2
7월 23
4977
1
6월 23
3353
1
4월 23
4202
1
10월 21
11550
0
10월 21
1636