Odoo Help

2

Using formatLang to display proper date format AND hours

By
Laurens
on 6/11/13, 11:09 AM 8,583 views

If I use [[ o.date_start ]] in the report editor, the report will show the date as it is listed under the database: e.g. "2013-06-11 08:00:00". It will use the server format and time. (time = incorrect)

If I use [[ formatLang(o.date_start,date=True) ]]then the date will be formatted correctly: "11-06-2013".

However, now the timestamp is missing; and you no longer know when exactly something will occur.

How can I format my date properly, but still show the timestamp as well?

5
Davide Corio
On 6/11/13, 11:38 AM

you can use date_time=True instead of date=True

Hey Davide, I had just figured this out; but I couldn't get back on the site to comment. I think they are changing the layout again or something. Either way this is definatly the solution. Thanks for your feedback!

Laurens
on 6/11/13, 11:44 AM

Thanks @ Davide Corio.. This code successfully work.

Ankit H Gandhi(AHG)
on 2/3/15, 9:10 AM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)

Stats

Asked: 6/11/13, 11:09 AM
Seen: 8583 times
Last updated: 3/16/15, 8:10 AM