How to convert the 24-hour hourly billing to the am/pm format
Source: Internet
Author: User
How do I convert the 24-hour hourly billing to the am/pm format? Date & nbsp; 24-hour time calculation & nbsp; & n how to convert the 24-hour time calculation to the am/pm format?
Date: 24-hour hourly date: am/pm
00:00:00?
00:00:01?
00:59:59?
01:00:00?
01:00:01?
11:59:59?
12:00:00?
12:00:01?
12:59:59?
13:00:00?
13:00:01?
23:00:00?
23:00:01?
23:59:59?
No general functions or anything?
------ Solution --------------------
The remainder of the hour.
Modulo 0 is am modulo 1 is pm
------ Solution --------------------
JS or PHP?
------ Solution --------------------
Mind using unix Timestamps
Date ('A', time () using the date function ())
------ Solution --------------------
Slow down, huh, huh
Ls correct
Echo date ('Y-m-d H: I: s A', strtotime ('2017-08-02 00:00:00 '));
------ Solution --------------------
UPDATE table
SET 24-hour timing = IF (LEFT (24-hour timing, 2)> 12,
CONCAT (LEFT (24-hour hourly, 2)-12, RIGHT (24-hour hourly, 6 )),
24-hour timing ),
T = IF (LEFT (24-hour timing system, 2)> 12, 'AM', 'PM ');
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.