开发者

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;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜