Reputation:
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.
Upvotes: 0
Views: 112
Reputation: 174
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.
Upvotes: 1