Home > Backend Development > PHP Tutorial > 请问用什么方法在记录时间的时候记录完整信息,但只输出小时,分,秒信息

请问用什么方法在记录时间的时候记录完整信息,但只输出小时,分,秒信息

WBOY
Release: 2016-06-13 13:23:48
Original
954 people have browsed it

请教用什么方法在记录时间的时候记录完整信息,但只输出小时,分,秒信息
$time = date("Y-m-d H:i:s");

这个写入数据库,是完整的时间信息

请教,从数据库查询出之后,用什么方式,只输出小时,分,秒的信息

------解决方案--------------------
date('H:i:s',strtotime($time));

------解决方案--------------------
数据库中的字段类型是什么?

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