提示:其他語言是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解決了您的大多數問題,並使您的生產率提高了80%
  • 重用任何東西: 將最常用或最複雜的公式,圖表和其他任何內容添加到您的收藏夾中,並在將來快速重複使用它們。
  • 超過20文本功能: 從文本字符串中提取數字; 提取或刪除部分文字; 將數字和貨幣轉換為英文單詞。
  • 合併工具:將多個工作簿和工作表合二為一; 合併多個單元格/行/列,而不會丟失數據; 合併重複的行和總和。
  • 拆分工具:根據價值將數據分割成多個工作表; 一本工作簿可轉換為多個Excel,PDF或CSV文件; 一列到多列。
  • 粘貼跳過 隱藏/過濾行; 數和總和 按背景顏色; 將個性化電子郵件批量發送給多個收件人。
  • 超級過濾器: 創建高級過濾方案並應用於任何工作表; 分類 按週,日,頻率等; 過濾 通過大膽,公式,評論......
  • 超過300強大的功能; 與Office 2007-2019和365一起使用; 支持所有語言; 在您的企業或組織中輕鬆部署。

箭頭藍色右泡 在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。 支持所有語言。 在您的企業或組織中輕鬆部署。 全功能30天免費試用。
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 · 6 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 · 6 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 · 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 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 · 2 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 · 4 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 · 4 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 · 4 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 · 5 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 · 5 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)