What’s wrong with this? str_to_date('26/04/2011 00:00:00', '%d/%m/%Y')
It gives Error Code: 1292 Truncated incorrect date value: '26/04/2011 00:00:00'
Update: The problem is the 00:00:00, if I remove it it works. How can edit the '%d/%m/%Y' to accept the time? '%d/%m/%Y %h:%m:%s' doesn’t work.
Since you’ve specified the time in the value parameter, you should also specify the time components in the date format parameter.
either that, or drop the time component from your date value:
either should work, but you need to be consistent between the two parameters.
Alternatively, you could specify the format so that it has fixed values in the time component:
this will work, but only if the time component is always
00:00:00.