Odoo Help


This community 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.


Using formatLang to display proper date format AND hours

on 6/11/13, 11:09 AM 7,104 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?


Davide Corio

--Davide Corio--
| 4 3 7
Bricherasio, Italy
--Davide Corio--

Odoo Evangelist and Consultant

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!

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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)


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