时间:2021-07-01 10:21:17 帮助过:25人阅读
$date= date("Y-m-d",strtotime("2011-12-12"));
第二种方式
代码如下:
$date = "2011-12-12";
$year=((int)substr($date,0,4));//取得年份
$month=((int)substr($date,5,2));//取得月份
$day=((int)substr($date,8,2));//取得几号
$_date = date("M-d-Y",mktime(0,0,0,$month,$day,$year));