Home >Backend Development >PHP Tutorial > php时间格式,该如何处理

php时间格式,该如何处理

WBOY
WBOYOriginal
2016-06-13 13:20:28773browse

php时间格式
我在mysql数据库中存的时间为2012-08-07 13:30:00;
我想在页面中输出:2012/08/07 13:30
怎么弄啊?

------解决方案--------------------
select date_format(time,"%Y/%m/%d %H:%i") from tt ;
------解决方案--------------------

探讨

select date_format(time,"%Y/%m/%d %H:%i") from tt ;
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn