Home  >  Article  >  Backend Development  >  DATE_FORMAT如何用

DATE_FORMAT如何用

WBOY
WBOYOriginal
2016-06-13 12:58:08750browse

DATE_FORMAT怎么用
DATE_FORMAT(submit_time,'%Y年%m月%d日%H时%i分%s秒');
按上面做年月日都出来了,时分秒没出来一直是00时00分00秒
怎么回事
------解决方案--------------------
你的 submit_time 字段有时分秒吗
------解决方案--------------------
可以的啊。。
------解决方案--------------------
你数据库里有时分秒吗? 类型是date 还是 datetime ?

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