如何在新的Google工作表中将持续时间格式设置为HH:mm [英] How to format a duration as HH:mm in the new Google sheets
问题描述
在新的Google表格中,有一种格式化数字的方法。格式 - >数字 - >持续时间。
-
1
格式为24:00:00
-
1.2 被格式化为
28 :48:00
-
1.5
被格式化为36:00:00
-
0.03125 被格式化为
0:45:00
。
我不需要持续时间表示中的秒数,因为它们膨胀了我的时间表。
如何将持续时间格式设置为HH:mm(不使用公式来计算小时和分钟,并用冒号连接)。是否有使用TEXT公式的方法。
这就是我想要的方式:
1
被格式化为 24:00
1.2
被格式化为 28:48
1.5
被格式化为 36:00
(我不需要 12:00 > datetime格式化将完成)
0.03125
被格式化为 0:45
不需要使用公式,您可以定义自己的自定义格式。
只需转到格式 - >数字 - >更多格式 - >更多日期和时间格式。它将打开一个包含多种日期和时间格式的窗口供您选择。您也可以使用上面的文本区域定义您自己的:
- 点击左侧的小箭头,然后选择第一个元素你想添加:经过的时间。请注意,有两种不同的小时,一种用于时间,另一种用于持续时间。
- 再次点击箭头并添加第二个元素:已用分钟。 最后,点击您添加的每个元素,以确定正确的格式(例如,后面的零或不)。
In the new Google sheets there's a way of formatting a number as a duration. Format -> Number -> Duration.
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.
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.
This is how I would like it:
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:
- Click on the small arrow on the left, and select the first element you want to add: elapsed hours. Notice there are two different "hours", one for time and another for durations.
- Type your separator text
:
- Click on the arrow again and add the second element: Elapsed Minutes.
- Finally, click on each element you added, to determine the correct format (trailing zeros or not, for example).
这篇关于如何在新的Google工作表中将持续时间格式设置为HH:mm的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!