Hi to all,
Ok the situation that i have is im adding things in my database(someth ing similar).The database that i was using was access and i had to change it to MySQL.As i came to know the date format of access and mysql are not the same i did something like this in my phpmyadmin(wamp )-->
when i execute the above lines in phpmyadmin i get something like this-->
[PHP]
DATE_FORMAT(now (), '%d/%m/%Y')
24/10/2007
[/PHP]
Im using jsp and servlets though.But still when i type the date in my jsp page i get an mysql exception-->
Ive no clue what this error states and how to solve this error.Can anybody help me in this regard.I hope ive conveyed my problem.
regards,
ajos
Ok the situation that i have is im adding things in my database(someth ing similar).The database that i was using was access and i had to change it to MySQL.As i came to know the date format of access and mysql are not the same i did something like this in my phpmyadmin(wamp )-->
Code:
SELECT DATE_FORMAT(now(), '%d/%m/%y')
[PHP]
DATE_FORMAT(now (), '%d/%m/%Y')
24/10/2007
[/PHP]
Im using jsp and servlets though.But still when i type the date in my jsp page i get an mysql exception-->
MYSQLException
SQLState:01004
Message:Data truncation: Incorrect date value: '24/10/2007' for column 'Req_Date' at row 1
Error:0
SQLState:01004
Message:Data truncation: Incorrect date value: '24/10/2007' for column 'Req_Date' at row 1
Error:0
regards,
ajos
Comment