简体   繁体   English

日期和时间值之间的差异,以秒为单位(Excel)

[英]Difference between DATE & TIME values in seconds (Excel)

In my Excel sheet I have a column with dates and times which looks like this: 27.09.2016 14:02:03 在我的Excel工作表中,我有一列日期和时间,看起来像这样:27.09.2016 14:02:03

I would like to get the difference between each pair of date in seconds. 我想以秒为单位来获取每对日期之间的差异。

For Example: 10.10.2016 13:00:10 - 10.10.2016 13:00:00 = 10s 例如:10.10.2016 13:00:10-10.10.2016 13:00:00 = 10s

If I do 如果我做

= A 1- A2

I get 0,000115741 我得到0,000115741

Can anyone please help me? 谁能帮帮我吗?

Alex. 亚历克斯。 S response is good enough, you can also multiply what you are getting by 86400 (which is the result of 60*60*24, you just save some operations) There are other alternatives you can explore. S响应足够好,您还可以将得到的结果乘以86400(这是60 * 60 * 24的结果,您只需保存一些操作)即可探索其他替代方案。 You can take a look to this link: https://www.ablebits.com/office-addins-blog/2015/06/24/calculate-time-excel/ 您可以查看以下链接: https : //www.ablebits.com/office-addins-blog/2015/06/24/calculate-time-excel/

The value is in days (24 hours) not in seconds. 该值以天(24小时)为单位,而不是以秒为单位。 10 seconds are (almost) exactly that fraction of 24 hours that you get as the answer. 10秒(几乎)恰好是您获得答案的24小时分数。 Multiply it with 60x60x24 and you get your 10 seconds. 将其乘以60x60x24即可得到10秒。

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

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