Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
9869 Weergaven

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')" />


Avatar
Annuleer
Auteur Beste antwoord

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>
Avatar
Annuleer

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

Gerelateerde posts Antwoorden Weergaven Activiteit
2
feb. 16
5999
7
dec. 23
21981
0
aug. 16
5747
4
aug. 24
77060
2
okt. 21
7830