简体   繁体   中英

Excel unable to read date&time data

i have an excel file and facing an issue ie in column C i haves some value (day:houre:minute:second:000) and i want to minus this value from column D having a different value but with same formatting but i am unable to get the results in column E. it seems that excel is not properly reading the column C values as i have exported this file from a software. please help me to solve this issue

在此处输入图片说明

formula used is simply DC

You will need to parse the string to create a true Date/Time then subtract and use TEXT to return the correct string:

=TEXT((LEFT(B1,FIND(":",B1)-1) + MID(SUBSTITUTE(B1,":",".",4),FIND(":",B1)+1,999))-(LEFT(A1,FIND(":",A1)-1) + MID(SUBSTITUTE(A1,":",".",4),FIND(":",A1)+1,999)),"dd\:hh:mm:ss.000")

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM