String To Date Conversion in Mysql -
i have column values 20150921. want convert string value specified date format 2015-09-21 in mysql.
try this:
date_format(str_to_date('20150921', '%y%m%d'),'%y-%m-%d')
(assuming want date format in yyyy-mm-dd format)
Comments
Post a Comment