如何获取Excel中的2 datetimestamp之间的小时和分钟差异? [英] How to get the hour and minutes difference between 2 datetimestamp in Excel?

查看:148
本文介绍了如何获取Excel中的2 datetimestamp之间的小时和分钟差异?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我有2个时间戳记日期:


  1. 2/24/2010 1:05:15 AM

  2. 2/25/2010 4:05:17 AM

任何人都可以告知我应该在Excel中使用什么功能



谢谢。

解决方案

小时差异:

  =(A2-A1)* 24 
pre>

分钟差值:

  =(A2-A1 )* 24 * 60 

小时和分钟之间的差异:

  = TRUNC((A2-A1)* 24) - 小时部分
= MOD((A2-A1)* 24 * 60,60)分钟部分


Suppose I have 2 timestamp dates:

  1. 2/24/2010 1:05:15 AM
  2. 2/25/2010 4:05:17 AM

Can anyone please advise what function should I use in Excel to get the difference in hours and minutes?

Thanks.

解决方案

The difference in hours:

=(A2-A1)*24

The difference in minutes:

=(A2-A1)*24*60

The difference in hours and minutes:

=TRUNC((A2-A1)*24)      - the hours portion
=MOD((A2-A1)*24*60,60)  - the minutes portion

这篇关于如何获取Excel中的2 datetimestamp之间的小时和分钟差异?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆