php 中将完整的年月日时分秒的时间转换成 年月日的形式

strtotime() 函数将任何英文文本的日期或时间描述解析为 Unix 时间戳(自 January 1 1970 00:00:00 GMT 起的秒数),

将完整的时间格式转换成时间撮的形式,再去进行转换。

echo date("Y-m-d",strtotime("2014-05-05 16:05:32"));
原文地址:https://www.cnblogs.com/xs-yqz/p/6525712.html