跳到主要内容

如何在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时间格式转换为小时/分钟/秒:

Kutools for Excel's 转换时间 功能可以帮助您根据需要将多种时间格式转换为小时,分钟或秒。 点击立即下载并免费试用 Kutools for Excel!

doc将12小时转换为24小时4

Kutools for Excel:具有300多个方便的Excel加载项,可以在30天内免费试用,没有任何限制。 立即下载并免费试用!

 

最佳办公生产力工具

热门特色: 查找、突出显示或识别重复项   |  删除空白行   |  合并列或单元格而不丢失数据   |   不使用公式进行四舍五入 ...
超级查询: 多条件VLookup    多值VLookup  |   跨多个工作表的 VLookup   |   模糊查询 ....
高级下拉列表: 快速创建下拉列表   |  依赖下拉列表   |  多选下拉列表 ....
列管理器: 添加特定数量的列  |  移动列  |  切换隐藏列的可见性状态  |  比较范围和列 ...
特色功能: 网格焦点   |  设计图   |   大方程式酒吧    工作簿和工作表管理器   |  资源库 (自动文本)   |  日期选择器   |  合并工作表   |  加密/解密单元格    按列表发送电子邮件   |  超级筛选   |   特殊过滤器 (过滤粗体/斜体/删除线...)...
前 15 个工具集12 文本 工具 (添加文本, 删除字符,...)   |   50+ 图表 类型 (甘特图,...)   |   40+ 实用 公式 (根据生日计算年龄,...)   |   19 插入 工具 (插入二维码, 从路径插入图片,...)   |   12 转化 工具 (小写金额转大写, 货币兑换,...)   |   7 合并与拆分 工具 (高级组合行, 分裂细胞,...)   |   ... 和更多

使用 Kutools for Excel 增强您的 Excel 技能,体验前所未有的效率。 Kutools for Excel 提供了 300 多种高级功能来提高生产力并节省时间。  单击此处获取您最需要的功能...

kte选项卡201905


Office Tab 为 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