Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
9911 มุมมอง

Hello all,

In a qweb report I have this code to format a date :

    <span t-esc="formatLang(data['form']['date_start'],date=True)"/>

It displays the date like this : 18.11.2015

But I want the month in letter like this : 18 novembre 2015

I have tried many things.

How could I get this format please?


UPDATE #1

With the print date of the report, this one works well :

     <strong>Print Date</strong> :<br/>
    <span t-esc="time.strftime('%e %B %Y')" />


อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

Hey gang!

This code works very well for me :

 <div class="col-xs-3">     
    <strong>End Period</strong> :<br/>     
    <span t-esc="time.strftime('%d %B %Y',time.strptime(data['form']['date_end'],'%Y-%m-%d'))"/>
</div>
อวตาร
ละทิ้ง

Is there any way to print first three letter of month alone while printing date?

Related Posts ตอบกลับ มุมมอง กิจกรรม
2
ก.พ. 16
6058
7
ธ.ค. 23
22044
0
ส.ค. 16
5816
4
ส.ค. 24
77152
2
ต.ค. 21
7870