且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

MySQL将varchar转换为日期

更新时间:2023-11-29 12:41:58

select date_format(str_to_date('31/12/2010', '%d/%m/%Y'), '%Y%m'); 

select date_format(str_to_date('12/31/2011', '%m/%d/%Y'), '%Y%m'); 

很难从您的例子中分辨出来

hard to tell from your example