Researching a little I found this answer.
The steps are simple :
- Check your current datestyle "ISO, DMY" or "IOS, MDY".
Now Depending on what you want in the postgres MDY or DMY
ALTER DATABASE "my_database_name" SET datestyle TO "ISO, DMY";
or
ALTER DATABASE "my_database_name" SET datestyle TO "ISO, MDY";
After this it will be necessary to restart the server
sudo service postgresql Restart
Or
sudo /etc/init. d/postgresql Restart
Test the configuration
Query: SELECT '12/20/2016':date Output: "2016-12-20"
Or
Query: SELECT '12/19/2016':date Output: "2016-12-19"
In this case we use, ALTER DATABASE "my_database_name" SET datestyle TO "ISO, DMY";
.
Yes it is possible, :D even had an answer .... I just can’t find it
– rray
@rray hehe, was intentional to help, because I saw that the site did not have. : D
– Guilherme Lautert
I used this, only I always set this setting in the session.
– rray
@rray
SET datestyle TO "ISO, DMY";
?– Guilherme Lautert
That, even, hehe you mode not always mess shape Globa on the server there already saw. I found :)
– rray