Searching a little bit found this answer .
The steps are simple:
Check your current datestyle "ISO, DMY" or "IOS, MDY".
Now Depending on what you want in postgres DMY 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 you will have to restart the server
sudo service postgresql restart
Or
sudo /etc/init.d/postgresql restart
Test the configuration
Query: SELECT '20 / 12/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";
.