Odoo Help

Welcome!

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.

0

HOW TO CHANGE DATE FORMAT FROM THE DATABASE

By
Olalekan Babawale
on 5/5/16, 4:18 AM 367 views

Hi,

Please I have date fields on my odoo application and I have changed the date format to dd-mm-yyyy  from the Settings>Language menu. However, when I export my data to excel, the date is not fromatted the same way. I have a feeling that this has to be done from postgres. Can someone please help?

0
Gustavo Hinojosa
On 5/5/16, 9:02 AM

I, hope you

 SELECT

((po.date_order AT TIME ZONE 'UTC' AT TIME ZONE 'BOT')::date) as date

,((po.create_date AT TIME ZONE 'UTC' AT TIME ZONE 'BOT')::timestamp) as datetime

,to_char(((po.date_order AT TIME ZONE 'UTC' AT TIME ZONE 'BOT')::date), 'DD/MM/YYYY') as date_format

,to_char(((po.create_date AT TIME ZONE 'UTC' AT TIME ZONE 'BOT')::timestamp), 'DD/MM/YYYY HH:MM:SS') as datetime_format

FROM purchase_order AS po

WHERE ((po.date_order AT TIME ZONE 'UTC' AT TIME ZONE 'BOT')::date) BETWEEN '2015-01-01' AND '2016-05-31';


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

1 follower(s)

Stats

Asked: 5/5/16, 4:18 AM
Seen: 367 times
Last updated: 5/5/16, 9:02 AM