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

c++ - llvm function pass ReplaceInstWithInst malloc -

java.lang.NoClassDefFoundError When Creating New Android Project -

Decoding a Python 2 `tempfile` with python-future -