简体   繁体   English

Excel无法读取日期和时间数据

[英]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.我有一个 excel 文件并面临一个问题,即在 C 列中我有一些值(天:小时:分钟:秒:000),我想从 D 列中减去该值,该值具有不同的值但格式相同,但我无法以获得 E 列中的结果。似乎 excel 没有正确读取 C 列值,因为我已从软件导出此文件。 please help me to solve this issue请帮我解决这个问题

在此处输入图片说明

formula used is simply DC使用的公式只是 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 返回正确的字符串:

=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")

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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