mysql refusing to recognize changes in date&datetime for

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
raghavan20
DevNet Resident
Posts: 1451
Joined: Sat Jun 11, 2005 6:57 am
Location: London, UK
Contact:

mysql refusing to recognize changes in date&datetime for

Post by raghavan20 »

I am trying to change the way the dates are stored so that it follows this format, %d %m %Y. I have added two lines in my.cnf and when I restarted mysql server, it shows up in variables but they are not used by mysql for generating dates and timestamps.

Code: Select all

mysql> show variables like '%format%';
+---------------------+-------------------+
| Variable_name       | Value             |
+---------------------+-------------------+
| date_format         | %d-%m-%Y          |
| datetime_format     | %d-%m-%Y %H-%i-%s |
| default_week_format | 0                 |
| time_format         | %H:%i:%s          |
+---------------------+-------------------+
4 rows in set
 
mysql> select now();
+---------------------+
| now()               |
+---------------------+
| 2006-05-03 15:17:50 |
+---------------------+
1 row in set 
 
mysql> select curdate();
+------------+
| curdate()  |
+------------+
| 2006-05-03 |
+------------+
Post Reply