while inserting date mysql server takes the year and day correctly but the month is defaultly taking januavary into the database. i am using mysql server version 5.0.22 i am inserting the date though application. the application was developed by using Springs web mvc frame-work and Hibernate.
+1
A:
Can you display the mysql INSERT statement which is being used to insert the data into the database? This would indicate whether it is a malformed INSERT statement or whether it is a valid statement using incorrect data.
Once you know what is happening, you can track down where the problem really is. I would guess it is a faulty date-parsing function.
Another possibility is that the software is expecting the date in European format (dd-mm-yyyy) and getting the entry in US format (mm-dd-yyyy) or vice-versa. And this is causing parsing errors.
shortbaldman
2009-02-28 10:29:10
mysql date is always yyyy-mm-dd, but software could be misconfigured.
dusoft
2009-02-28 10:41:25