How can I record the complete information when recording the time, but only the hour, minute, and second information is output?
Source: Internet
Author: User
How can I record the complete information when recording the time, but only the hour, minute, and second information $ time = date (& quot; Y-m-dH: I: s & quot;); this is the complete time information written to the database. For more information, see How to output the hour, minute, and second information after the database is queried, date ('H: I: S', strtotime ($ time) ask how to record the complete information when recording the time, but only output the hour, minute, and second information
$ Time = date ("Y-m-d H: I: s ");
This is the complete time information written to the database.
How can I output the hour, minute, and second information after querying the database?
------ Solution --------------------
Date ('H: I: S', strtotime ($ time ));
------ Solution --------------------
What is the field type in the database?
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service