提示:其它语言是由 Google 机器翻译的。 你可以访问 English 版本。
登录
x
or
x
x
马上登记
x

or

如何计算两次或日期之间的时间差?

如果你有两个时间表,比如A列和B列(A列的时间早于B列的同一行),如下图所示,你不能得到正确的时间与以后的时间不同,早一点。 所以现在我谈一下在Excel中计算时差的方法。


在Excel中轻松地将小时/分钟/秒添加到日期时间

假设你在一个单元格中有一个日期时间格式的数据,比如2015 / 5 / 3 17:53:20,现在你需要在这个日期添加一些小时,分钟或秒钟。 通常情况下,使用公式是所有Excel用户的第一种方法,但很难记住所有的公式。 同 Kutools for Excel内置的 常用的公式 您可以使用公式轻松地将小时,分钟或秒钟添加到日期时间,并且不需要记住公式。 点击60天免费试用!
doc添加小时分秒
Kutools for Excel:拥有超过200便利的Excel加载项,可以在60天免费试用,不受限制。
Office选项卡在Office中启用选项卡式编辑和浏览,使您的工作更轻松......
Kutools for Excel - 最佳办公生产力工具将解决您的大部分Excel问题
  • 重用任何东西: 将最常用或最复杂的公式,图表和其他任何内容添加到您的收藏夹中,并在将来快速重复使用它们。
  • 超过20文本功能: 从文本字符串中提取数字; 提取或删除部分文本; 将数字和货币转换为英语单词...
  • 合并工具:多个工作簿和表格合二为一; 合并多个单元格/行/列而不丢失数据; 合并重复行和总和...
  • 拆分工具:根据价值将数据拆分为多个表格; 一个工作簿到多个Excel,PDF或CSV文件; 一列到多列......
  • 粘贴跳过 隐藏/过滤行; 数和总和 按背景颜色; 创建邮件列表和 通过Cell的价值发送电子邮件...
  • 超级过滤器: 创建高级过滤方案并应用于任何工作表; 排序 按周,日,频率等; 筛选 通过大胆,公式,评论......
  • 超过300强大的功能; 适用于Office 2007-2019和365; 支持所有语言; 在公司轻松部署; 全功能60天免费试用。

箭头蓝色右泡 在Excel中计算两次之间的时间差


在我们的例子中,我们假设两列中只有小时,分钟和秒,列A中的时间总是早于同一行中的列B.

1。 选择一个空白单元格,在这种情况下,我选择Cell C2,输入这个公式 = B2-A2 +(A2> B2) (Cell A2中的时间早于Cell B2,您可以根据需要更改它们),按 输入 键,然后拖动填充手柄以填充应用此公式所需的范围。 看截图:

2。 选择结果范围,在这种情况下选择结果范围C2:C6,然后右键单击> 格式单元格 在上下文菜单中。 看截图:

3。 在里面 单元格格式 对话框中,单击 标签> 时间,并从右侧选择所需的时间格式,点击 OK。 看截图:

然后你可以看到时间差已经被计算出来了,如下所示:


箭头蓝色右泡 计算Excel中两个日期之间的时间差

如果不仅有小时,分钟和秒,而且还有列中的日期,您可以按照以下步骤进行操作:

1。 选择一个空白单元格,在这种情况下,我选择Cell C2,输入这个公式 = B2-A2 (Cell A2中的时间早于Cell B2,您可以根据需要更改它们),按 输入 键,然后拖动填充手柄以填充应用此公式所需的范围。 看截图:

2。 选择结果范围,在这种情况下选择范围C2:C6,然后右键单击> 格式单元格 在上下文菜单中。 看截图:

3。 在里面 单元格格式 对话框中,单击 标签> 时间,然后选择 37:30:55 来自 类型 部分,点击 OK。 看截图:

然后你可以看到时间差已经被计算出来了,如下所示:


箭头蓝色右泡 用Kutools for Excel显示十进制小时,分钟或秒钟的时差

如果要将计算出的时差显示为十进制小时,分钟或秒,则可以使用 转换时间 实用程序 Kutools for Excel.

Kutools for Excel, 与超过 120 方便的Excel功能,提高工作效率,节省工作时间。

免费安装 Kutools for Excel,请按照以下步骤操作:

1。 选择计算结果,看截图:
doc时差kte 1

2。 点击 Kutools > 内容 > 转换时间 显示子菜单,你可以选择 时间到几小时, 时间到分钟 or 时间到秒 如你所需。 看截图:
doc时差kte 2

选择一个选项后,选定的数据将被转换成十进制小时,分钟或秒。

显示为十进制小时数
显示为十进制分钟
显示为小数秒
doc时差kte 3
doc时差kte 4
doc时差kte 5

请注意:

如果要将转换的结果保存在其他位置,则可以选择数据并单击 Kutools > 内容 > 转换时间 > 转换时间 使之成为可能 转换时间 对话框,并选择一个转换类型,并检查 保存到另一个位置 并选择一个单元格来输出结果。 点击 Ok.

doc时差kte 6doc时差kte 7

箭头蓝色右泡 将时间转换为十进制值


将相同的文本添加到Excel中每个单元格的特定位置

你怎么能在多个单元格的开头添加文本或字符,或者在单元格的末尾添加文本或字符,或者在现有文本之间插入文本或字符? 同 添加文本 Kutools for Excel的实用程序,可以快速应用以下操作:。 点击60天免费试用!
doc添加文本6
Kutools for Excel:拥有超过200便利的Excel加载项,可以在60天免费试用,不受限制。

相关文章:


Kutools for Excel - 最佳办公生产力工具提高80%的生产力

  • 重用: 快速插入 复杂的公式,图表 以及你以前用过的任何东西; 加密单元格 密码; 创建邮件列表 并发送电子邮件...
  • 超级方程式酒吧 (轻松编辑多行文字和公式); 阅读布局 (轻松读取和编辑大量单元格); 粘贴到过滤范围...
  • 合并单元格/行/列 不丢失数据; 分裂细胞含量; 组合重复的行/列...防止重复的细胞; 比较范围...
  • 选择复制或唯一 行; 选择空行 (所有细胞都是空的); 超级查找和模糊查找 在许多工作簿中; 随机选择......
  • 精确复制 多个单元格而不更改公式参考; 自动创建参考 多张表; 插入项目符号,复选框等等......
  • 提取文本,添加文本,按位置删除, 删除空间; 创建和打印分页小计; 在单元格内容和注释之间转换...
  • 超级过滤器 (将过滤方案保存并应用到其他工作表); 高级排序 按月/周/日,频率等; 特殊过滤器 用粗体,斜体......
  • 结合工作簿和工作表; 根据键列合并表; 将数据拆分为多个表格; 批量转换xls,xlsx和PDF...
  • 超过300强大的功能。 支持Office / Excel 2007-2019和365。 支持所有语言。 在您的企业或组织中轻松部署。 全功能60天免费试用。
kte tab 201905

Office选项卡为Office提供选项卡式界面,使您的工作更轻松

  • 在Word,Excel,PowerPoint中启用选项卡式编辑和阅读,Publisher,Access,Visio和Project。
  • 在同一窗口的新选项卡中打开并创建多个文档,而不是在新窗口中。
  • 通过50%提高您的工作效率,每天为您减少数百次鼠标点击!
官方底部
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    prasad nalluri · 4 months ago
    how to calculate difference for the below scenario


    4/8/2019 10:18:22 AM

    4/8/2019 6:10:01 PM

    please help me..
    • To post as a guest, your comment is unpublished.
      Sunny · 3 months ago
      Hi, prasad nalliri, just use one date to minus another date, then format the result (a number string) as a date or time format as you need:
      A1 4/8/2019 10:18:22 AM

      A2 4/8/2019 6:10:01 PM
      Using this formula in B1: ==ABS(A1-A2)
      Result: 0.327534722
      Format the result as time or date
  • To post as a guest, your comment is unpublished.
    Rlicmoan · 1 years ago
    Hi there, I know how to calculate the difference between a start and finish time. However, I would like to know what is the formula when I also want to minus a target date Is there such a formula?



    example: start date: 10/29/17 12:00 AM

    A. 1st transaction date: 10/28/17 03:22 PM
    B. end of 1st transaction date: 10/30/17 01:13 PM


    if Column A is not equal to 10/29/17 12:00am then excess hours should be subtracted from the accumulated hrs from A and B
    • To post as a guest, your comment is unpublished.
      Sunny · 1 years ago
      Sorry, Could you give a compliacted instance? Through your description, I do not understand clearly.
  • To post as a guest, your comment is unpublished.
    Julie Fuller · 2 years ago
    Hi there, I know how to calculate the difference between a start and finish time. However, I would like to know what the formula is when I also want to minus 30minutes. Is there such a formula?
    • To post as a guest, your comment is unpublished.
      Sunny · 2 years ago
      Thanks for your leaving massage, you can try this formula =A1-TIME(0,30,0). See screenshot:
  • To post as a guest, your comment is unpublished.
    Rats · 2 years ago
    Hi team,

    i want to caluculate the time difference in the same cell ans the working hours should be come in next colum
    for example under timings 9:00am-06:00pm is there i want to know the working time in hours for example like 8 hrs or 9 hours like that.

    Sample:
    Timings Hours
    09:15 AM - 06:15 PM
  • To post as a guest, your comment is unpublished.
    Prabhu · 3 years ago
    I want to highlight the late comers time by getting the difference of exceed time(late time) with the actual time
    For ex:
    if the actual time is 8.00AM if anyone comes by 8.30AM ,the time difference be 0.30minutes ..
    How can i highlight that 30 minutes using conditional formating in excel? or is there any options to highlight that?
  • To post as a guest, your comment is unpublished.
    DESHRAJ CHAUHAN · 3 years ago
    I am having A1 cell : 04/14/2016 11:15:43 and B2 cell : 03/31/2016 10:41:23 Please let me know the time duration in hrs of between two difference date.
    exmple
    refno reg_code status cpv_incoming_date CPV Out CPV Out Time WH CPV IN WH CPV IN time Range CPV In Time
    ABC A B 09-MAY-2016,14:00:50 10-May-16 16:06:59 10-May-16 9:30:00 >6 hrs and < 8 Hrs 9-May-16 14:00:50
  • To post as a guest, your comment is unpublished.
    YOgesh · 3 years ago
    I am having A1 cell : 04/14/2016 11:15:43 AM and B2 cell : 03/31/2016 10:41:23 AM. Please let me know the time duration in minutes of between two difference date.
  • To post as a guest, your comment is unpublished.
    alan · 3 years ago
    Scenario,
    Compare the h:mm:ss from the column A1 and display if the value in A2 cell is greater that 15 minutes then display the timing in proper column

    data condition
    There is a value in a cell A2, 0:16:38(h:mm:ss) and column B name "
  • To post as a guest, your comment is unpublished.
    Benedicta Acquah · 3 years ago
    ENTER EXIT TURN OVER
    825 847
    913 939 26
    1038 1109 59
    1133 1153 24

    Please can you help me find a formulate to calculate turnover. The difference between Exit to Enter. Thanks.
  • To post as a guest, your comment is unpublished.
    Shamim · 3 years ago
    Please advise how to convert time result 7.30 to 7.5 hours. Example result shows 7.30 hours different between two that should be total hours 7.5 in the time sheet.
  • To post as a guest, your comment is unpublished.
    MissR12345 · 3 years ago
    please assist
    how to calculate time difference and add to the next estimated time
    ie.

    A1 =27/10/2015 11:00PM B1 = 28/10/2015 02:30 AM C1 will be the (gained or lost time) then the next estimated start time will be C1 +B1+2hours
    B1 is actual start time and 2 hours is the expected time between the start times.
  • To post as a guest, your comment is unpublished.
    saqib · 4 years ago
    Hi dear,

    Our duty time is 8:00 to 5:00
    If user allowed time to complete task is 5 Hrs
    he start task at as 30th May, 2015 03:00 pm and finish on 1st June, 2015 10:00am,
    Now calculate total spending hours but exclude Sunday off day
    result should be as 4 Hrs
  • To post as a guest, your comment is unpublished.
    vinay · 4 years ago
    hi i want to Calculate time difference between two dates in Excel and also I have to exclude weekend and holidays

    pls suggest
  • To post as a guest, your comment is unpublished.
    Rajesh.MM · 4 years ago
    Dear All,

    by using IF formula time to be calculated if time crossed after 4 PM the formula should say late in warding...
  • To post as a guest, your comment is unpublished.
    shaunak · 4 years ago
    i having column A and B 's cell format is as 1:30 PM then which formula i have to apply to find difference in Hours...
  • To post as a guest, your comment is unpublished.
    khuliso · 5 years ago
    [quote]how do i calculate time different betwen A3 & A4 total display in b3[/quote][img]example.xlsx[/img]
  • To post as a guest, your comment is unpublished.
    Tamal · 5 years ago
    Any suggestion, if for the last case, in column C, I want to display the time difference to be displayed as total no. of minutes, how to do that?
    • To post as a guest, your comment is unpublished.
      Jimmy · 4 years ago
      Times (*) the Decimal answer by 24 eg;

      If c2 had your answer ie, 0.4375. It would be c2*24 = 10.5
      (0.4375*24 = 10.5)