ale*_*exn 7

<?php echo date('Y-m', strtotime('1985-12-15')); ?>
Run Code Online (Sandbox Code Playgroud)

应该这样做.

这将使用strtotime将1985-12-15转换为unix时间戳.然后,日期函数采用第二个参数时间戳来格式化日期.