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 - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -