Remove seconds from time field?
How do I remove seconds and only show hh:mm
?
The field type is time
. Eg:
SELECT opentime, closetime FROM hours
Result:
17:00:00 | 23:00:00
17:30:00 | 23:开发者_开发百科40:00
SELECT
TIME_FORMAT(opentime, "%H:%i") as opentime,
TIME_FORMAT(closetime, "%H:%i") as closetime
FROM hours;
精彩评论