I tried summing up:

SUM(TIME_FORMAT(TIMEDIFF(eTime, sTime),'%d d %k h %i m')) AS the_Time FROM Business

However, if I remove SUM it displays the format I want. If I add SUM then it returns null. Can anyone tell me how to sum up date and time?

有帮助吗?

解决方案

you need to sum up and then format

TIME_FORMAT(SUM(TIMEDIFF(eTime, sTime),'%d d %k h %i m')) AS tTime FROM Business
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top