假设A2单元格是起始时间,B2是结束时间.在其他如C2单元格写下公式:
1、时:分:秒格式(不计算天数): =TIME(HOUR(B2-A2),MINUTE(B2-A2),SECOND(B2-A2))
2、天时分秒格式: =CONCATENATE(DATEDIF(A2,B2,"d"),"天",HOUR(B2-A2),"时",MINUTE(B2-A2),"分",SECOND(B2-A2),"秒")
3、时分秒格式(将天数转换成小时): =CONCATENATE(DATEDIF(A2,B2,"d")*24+HOUR(B2-A2),"时",MINUTE(B2-A2),"分",SECOND(B2-A2),"秒")
4、全都换算成秒: =DATEDIF(A2,B2,"d")*24*3600+HOUR(B2-A2)*3600+MINUTE(B2-A2)*60+SECOND(B2-A2)