【发布时间】:2012-11-21 17:43:21
【问题描述】:
我试着总结了一下:
SUM(TIME_FORMAT(TIMEDIFF(eTime, sTime),'%d d %k h %i m')) AS the_Time FROM Business
但是,如果我删除 SUM,它会显示我想要的格式。如果我添加 SUM,则它返回 null。谁能告诉我如何总结日期和时间?
【问题讨论】:
标签: mysql date time sum time-format
我试着总结了一下:
SUM(TIME_FORMAT(TIMEDIFF(eTime, sTime),'%d d %k h %i m')) AS the_Time FROM Business
但是,如果我删除 SUM,它会显示我想要的格式。如果我添加 SUM,则它返回 null。谁能告诉我如何总结日期和时间?
【问题讨论】:
标签: mysql date time sum time-format
你需要总结然后格式化
TIME_FORMAT(SUM(TIMEDIFF(eTime, sTime),'%d d %k h %i m')) AS tTime FROM Business
【讨论】: