Odoo Help

0

Date Format

By
JOSEPH O'CONNOR
on 11/27/15, 3:59 AM 387 views

how can i change date format from mmddyy to ddmmyy

1

Drees Far

--Drees Far--
1126
| 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.

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

1 follower(s)

Stats

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