Odoo Help


Date Format

on 11/27/15, 3:59 AM 301 views

how can i change date format from mmddyy to ddmmyy


Drees Far

--Drees Far--
Drees Far
| 5 2 6
Tunis, Tunisia
--Drees Far--
Drees Far
On 11/27/15, 4:18 AM

Hello friend;

Try this:

datetime.datetime.strptime("01-11-2013", '%m-%d-%Y').strftime('%d/%m/%Y') 

prints "11/01/2013".

If you can't live with the leading zero, try this:

dt = datetime.datetime.strptime("2013-1-25", '%Y-%m-%d')

print '{0}/{1}/{2:02}'.format(dt.month, dt.day, dt.year % 100)

This prints "1/11/13" 

Best Regards.

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


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

1 follower(s)


Asked: 11/27/15, 3:59 AM
Seen: 301 times
Last updated: 11/27/15, 5:12 AM