تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
9866 أدوات العرض

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
فبراير 16
5997
7
ديسمبر 23
21979
0
أغسطس 16
5745
4
أغسطس 24
77044
2
أكتوبر 21
7823