跳到主要內容

如何在Excel中將dd hh mm時間格式轉換為小時或分鐘?

假設您有一個日期格式列表,如DD:HH:MM,它表示天,小時,分鐘,但是現在,您需要將其轉換為小時或分鐘。 本文將討論如何在Excel中將DD:HH:MM時間格式轉換為小時或分鐘。

將DD:HH:MM時間格式轉換為小時和分鐘

將DD HH:MM:SS時間格式僅轉換為分鐘


箭頭藍色右氣泡 將DD:HH:MM時間格式轉換為小時和分鐘

例如,要將01:23:15(1天,23小時,15分鐘)轉換為47:15(47小時,15分鐘),請應用以下公式:

輸入以下公式:

=24*LEFT(A2,FIND(":",A2)-1)+MID(A2,FIND(":",A2)+1,LEN(A2)-2-LEN(RIGHT(A2,LEN(A2)-FIND("@",SUBSTITUTE(A2,":","@",2))))-LEN(LEFT(A2,FIND(":",A2)-1)))&":"&TEXT(RIGHT(A2,LEN(A2)-FIND("@",SUBSTITUTE(A2,":","@",2))),"00") 到要輸出結果的空白單元格中,然後將填充手柄向下拖動到要應用此公式的單元格中,並且所有DD:HH:MM時間格式都已轉換為HH:MM時間格式,請參見屏幕截圖:

doc ddhhmm轉換為小時1


箭頭藍色右氣泡 將DD HH:MM:SS時間格式僅轉換為分鐘

如果您需要將DD HH:MM:SS日期格式僅轉換為分鐘,例如將01 23:15:00(1day,23hours,15minutes,0second)轉換為2835分鐘。 請應用以下公式:

在空白單元格中輸入以下公式:

=CONVERT(DATE(1900,1,LEFT(A2,FIND(" ",A2)-1))+TIME(RIGHT(LEFT(A2,FIND(":",A2)-1),FIND(" ",LEFT(A2,FIND(":",A2)-1))),LEFT(RIGHT(A2,LEN(A2)-FIND(":",A2)),FIND(":",RIGHT(A2,LEN(A2)-FIND(":",A2)))-1),RIGHT(A2,LEN(A2)-FIND(":",A2,FIND(":",A2)+1))),"day","mn") 然後將填充手柄向下拖動到包含此公式的單元格,並且DD HH:MM:SS日期格式已轉換為僅分鐘,請參見屏幕截圖:

doc ddhhmm轉換為小時2


將hh:mm:ss時間格式轉換為小時/分鐘/秒:

Excel的Kutools's 轉換時間 功能可以幫助您根據需要將多種時間格式轉換為小時,分鐘或秒。 點擊下載並立即免費試用Excel的Kutools!

doc將12小時轉換為24小時4

Excel的Kutools:具有300多個方便的Excel加載項,可以在30天內免費試用,沒有任何限制。 立即下載並免費試用!

 

最佳辦公生產力工具

🤖 Kutools 人工智慧助手:基於以下內容徹底改變數據分析: 智慧執行   |  生成代碼  |  建立自訂公式  |  分析數據並產生圖表  |  呼叫 Kutools 函數...
熱門特色: 尋找、突出顯示或識別重複項   |  刪除空白行   |  合併列或儲存格而不遺失數據   |   沒有公式的回合 ...
超級查詢: 多條件VLookup    多值VLookup  |   跨多個工作表的 VLookup   |   模糊查詢 ....
高級下拉列表: 快速建立下拉列表   |  依賴下拉列表   |  多選下拉列表 ....
欄目經理: 新增特定數量的列  |  移動列  |  切換隱藏列的可見性狀態  |  比較範圍和列 ...
特色功能: 網格焦點   |  設計圖   |   大方程式酒吧    工作簿和工作表管理器   |  資源庫 (自動文字)   |  日期選擇器   |  合併工作表   |  加密/解密單元格    按清單發送電子郵件   |  超級濾鏡   |   特殊過濾器 (過濾粗體/斜體/刪除線...)...
前 15 個工具集12 文本 工具 (添加文本, 刪除字符,...)   |   50+ 圖表 類型 (甘特圖,...)   |   40+ 實用 公式 (根據生日計算年齡,...)   |   19 插入 工具 (插入二維碼, 從路徑插入圖片,...)   |   12 轉化 工具 (數字到單詞, 貨幣兌換,...)   |   7 合併與拆分 工具 (高級合併行, 分裂細胞,...)   |   ... 和更多

使用 Kutools for Excel 增強您的 Excel 技能,體驗前所未有的效率。 Kutools for Excel 提供了 300 多種進階功能來提高生產力並節省時間。  點擊此處獲取您最需要的功能...

產品描述


Office選項卡為Office帶來了選項卡式界面,使您的工作更加輕鬆

  • 在Word,Excel,PowerPoint中啟用選項卡式編輯和閱讀,發布者,Access,Visio和Project。
  • 在同一窗口的新選項卡中而不是在新窗口中打開並創建多個文檔。
  • 將您的工作效率提高 50%,每天為您減少數百次鼠標點擊!

 

Comments (10)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
How would you convert the DD HH:MM:SS formula provided to output minutes if the original format is DD HH:MM instead of DD HH:MM:SS?
This comment was minimized by the moderator on the site
Hello, Caroline
To solve your problem, please apply the below formula:
=1440*(LEFT(A2,FIND(" ",A2)-1)+TIME(MID(A2,FIND(" ",A2)+1,FIND(":",A2)-FIND(" ",A2)-1),MID(A2,FIND(":",A2)+1,2),0))

Please try, hope it can help you!
This comment was minimized by the moderator on the site
I need to convert HH:MM:SS to hours only. It is coming into Excel from our database 3/01/1900 10:00:00 AM which is presenting as 82:00:00. I want this cell to just show 82 as a number. I found a formula using MROUND to achieve this very simply but I have lost the formula now! Any ideas?
This comment was minimized by the moderator on the site
Hello, Caitriona C
To solve your problem, maybe the below formula can help you:
=CONVERT(A2,"day","hr")


Please try, hope it can help you!
This comment was minimized by the moderator on the site
i have hours i need convert to day:hour:mint
This comment was minimized by the moderator on the site
Hi, prem,
To convert hours to dd:hh:mm format, please apply the below formula:
=DAY(A2/24)&":"&MOD(INT(A2),24)&":"&INT(MOD(A2,1)*60)

https://www.extendoffice.com/images/stories/comments/comment-skyyang/doc-covert-to-dd-hh-mm.png
Please try, hope it can help you!
This comment was minimized by the moderator on the site
Hello. How to ask excel to show more then 31 days in format "DD:HH:MM"?
Thanks in advance.
This comment was minimized by the moderator on the site
Hello, Gogara
Sorry, I can't get your point, could you upload a screenshot or attachment to explain your problem?
Thank you!
This comment was minimized by the moderator on the site
I have DD:HH:MM:SS and I want to convert to HH:MM:SS
This comment was minimized by the moderator on the site
I thought the formula for coverting DD:HH:mm:ss looked a little funky. I've been working with Excel for ages and i'm pretty good at getting it to do what I want but have a bit of trouble with data files generated by LANDH systems and need to convert to decimals. SInce I don't know python, my options are limited.

This funky formula did not work for me. The syntax is not like formulae I have used before so I'm just not going to mess with this one. I'm guessing I have to buy something first? I already bought office, that should be sufficient.
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations