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

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -