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

php时间格式,该如何处理

WBOY
Release: 2016-06-13 13:20:28
Original
772 people have browsed it

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 ;
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template