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

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -