[原] Excel中计算2个日期间的时间间隔
A1 年月日
A2 年月日
A3=ABS(MONTH(A2)-MONTH(A1)+(YEAR(A2)-YEAR(A1))*12)
A4=CONCATENATE(INT((ABS(MONTH(A2)-MONTH(A1)+(YEAR(A2)-YEAR(A1))*12))/12),"year",MOD((ABS(MONTH(A2)-MONTH(A1)+(YEAR(A2)-YEAR(A1))*12)),12),"month")
A2 年月日
A3=ABS(MONTH(A2)-MONTH(A1)+(YEAR(A2)-YEAR(A1))*12)
A4=CONCATENATE(INT((ABS(MONTH(A2)-MONTH(A1)+(YEAR(A2)-YEAR(A1))*12))/12),"year",MOD((ABS(MONTH(A2)-MONTH(A1)+(YEAR(A2)-YEAR(A1))*12)),12),"month")