Firstly: what I showed was not a query. And of course you cannot execute it. It showed the way you can use the STR_TO_DATE function. In order to use it proper you must put it in an SQL command like SELECT, UPDATE, etc.
Secondly: I cannot imagine that you cannot find that function. When you just follow the link I showed, you will be linked to the date and time functions chapter in the MySQL manual. Within that chapter you can search for the function you want to find.
Ronald :cool:
Yes I did use the function in a query(SELECT) and I was getting a 'syntax-error'. I also visited the page the link for which you'd provided and read the STR_TO_DATE() function there but after trying to use it I was getting an error. I searched for the same in the MySQL manual on my computer, couldn't find it anywhere. I have DATE_FORMAT(), TIME_FORMAT(), MAKEDATE(), NOW(), CAST() etc etc but no STR_TO_DATE() :(.
I really dont know why that is, perhaps my MySQL version doesn't have this function hence I'm getting the error.
Please guide if there is some other way. For the time being I'm trying to convert the DD-MM-YYYY Date into YYYY-MM-DD Date through the front-end(Java) itself and then save it in the backend.