php 日期格式转换万能公式

 

思路用strtotime转换时间的字符串

 

$t='2017-03-09 02:30';
echo(date('Y-m-d H-i', strtotime($t)));

posted @ 2017-03-22 16:07  公众号python学习开发  阅读(144)  评论(0编辑  收藏  举报