简体   繁体   English

如何在Excel中格式化日期时间差异

[英]How to format date-time diff in excel

I have two columns with dates in a numeric format (1231.231). 我有两列日期为数字格式(1231.231)。 I create a third column with their difference (eg, 4.061805555). 我用它们的区别创建了第三列(例如4.061805555)。 How can I format this to show "4 1:29"? 如何格式化显示“ 4 1:29”? I don't want to create string values in the column, just format how the data is displayed. 我不想在该列中创建字符串值,只需格式化数据的显示方式即可。

Right click on the cell. 右键单击该单元格。

Choose "Format Cells". 选择“设置单元格格式”。

Choose "Custom" from the Category dropdown on the Number tab. 从“数字”选项卡上的“类别”下拉列表中选择“自定义”。

Type dh:mm as your chosen format. 键入dh:mm作为您选择的格式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM