精准计算年龄到天数_qt


《公式函数》

=DATEDIF(--TEXT((LEN(A2)=15)*19&MID(A2,7,6+(LEN(A2)=18)*2),"0-00-00"),TODAY(),"y")&"周岁零"&DATEDIF(--TEXT((LEN(A2)=15)*19&MID(A2,7,6+(LEN(A2)=18)*2),"0-00-00"),TODAY(),"ym")&"月"&DATEDIF(--TEXT((LEN(A2)=15)*19&MID(A2,7,6+(LEN(A2)=18)*2),"0-00-00"),TODAY(),"md")&"天"

提取出生年月日的函数

=TEXT(MID(B3,7,8),"00-00-00")

提取性别的函数

=IF(ISODD(MID(B4,17,1)),"男","女")