Mysql str_to_date () return NULL -
i have string '10/01/2016 00:00'
want convert datetime
i tried this:
select str_to_date('10/01/2016 00:00', '%d/%m/%y %h:%i');
but it's not working. doing wrong?
the problem %h
expects hour in format 01-12 , providing hour 00. can use %h
expects hour in format 00-23, try this:
select str_to_date('10/01/2016 00:00', '%d/%m/%y %h:%i');
Comments
Post a Comment