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?
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');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With