コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
9894 ビュー

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?

関連投稿 返信 ビュー 活動
2
2月 16
6049
7
12月 23
22016
0
8月 16
5777
4
8月 24
77098
2
10月 21
7861