如何在新的 Google 表格中将持续时间格式化为 HH:mm [英] How to format a duration as HH:mm in the new Google sheets
问题描述
在新的 Google 表格中,有一种将数字格式化为持续时间的方法.格式 -> 数字 -> 持续时间.
In the new Google sheets there's a way of formatting a number as a duration. Format -> Number -> Duration.
1
的格式为24:00:00
1.2
格式为28:48:00
1.5
格式为36:00:00
0.03125
的格式为0:45:00
.
1
is formatted as24:00:00
1.2
is formatted as28:48:00
1.5
is formatted as36:00:00
0.03125
is formatted as0:45:00
.
我不需要持续时间表示中的秒数,因为它们使我的时间表膨胀.
I don't need the seconds in the duration representation, because they bloat my timesheet.
如何将持续时间格式化为 HH:mm(不使用公式计算小时和分钟并将其与冒号连接).有没有办法使用 TEXT 公式.
How can I format a duration as HH:mm (without using a formula to calculate hours and minutes and concatenate that with a colon). Is there a way of using the TEXT formula.
这就是我想要的:
1
的格式为24:00
1.2
的格式为28:48
1.5
被格式化为36:00
(我不需要日期时间格式化会完成的12:00
)0.03125
的格式为0:45
1
is formatted as24:00
1.2
is formatted as28:48
1.5
is formatted as36:00
(I don't need12:00
which datetime-formatting would accomplish)0.03125
is formatted as0:45
推荐答案
无需为此使用公式,您可以定义自己的自定义格式.
There is no need to use formulas for that, you can define your own custom formats.
只需转到格式 -> 数字 -> 更多格式 -> 更多日期和时间格式.它将打开一个窗口,其中包含多种日期和时间格式可供选择.您也可以使用上方的文本区域定义自己的内容:
Just go to Format -> Number -> More formats -> More date and time formats. It will open a window with several date and time formats to choose from. You can define your own as well, using the upper text area:
- 单击左侧的小箭头,然后选择要添加的第一个元素:经过的小时数.请注意,有两个不同的小时",一个是时间,另一个是持续时间.
- 输入分隔符文本
:
- 再次单击箭头并添加第二个元素:Elapsed Minutes.
- 最后,点击您添加的每个元素,以确定正确的格式(例如,尾随零与否).
这篇关于如何在新的 Google 表格中将持续时间格式化为 HH:mm的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!