convert string to 24 hour datetime format in mysql
datetime, datetime-format, mysql
Solution
Minutes is `%i`, not `%m` and 24-hour format is `%H`, not `%h`:
SELECT STR_TO_DATE('2014-07-09 23:30:00', '%Y-%m-%d %H:%i:%s');
Problem
I am new to mysql. I need to insert the string '2014-07-10 13:33:33' into the table column which has datetime datatype. I gave like this, ``` SELECT STR_TO_DATE('2014-07-09 23:30:00', '%Y/%m/%d %h:%m:%s'); ``` But i didn't not give the result. How to do this?