mysql string to date -


how can convert string/varchar '12-mar-2013' date 2013-03-12?

i tried

select str_to_date('12-mar-2013','%y-%m-%d');  select date_format('12-mar-2013','%y-%m-%d'); 

but both return null.

my current database version 5.5.7-rc.

use str_to_date.

try

select str_to_date('12-mar-2013','%d-%m-%y');  ->   2013-03-12 

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -