需要帮助将文本以持续时间格式转换为Google表格
在这里寻求一些帮助,我尝试在Google表上以持续时间格式将文本转换为时间,我使用了一些基本的曲目来分解文本(以D(Dise)H(days)H(hour)M(小时)M(分钟)和S(第二)将然后烘烤到时间函数中的值,但是对于24小时以上的输出,我无法在375小时的图像中正确格式化IE,应显示375:00:00或[H]或[H]:MM:SS:
吗?
想法
有什么 /电子表格/D/1YWHM5TPALOULHMBFDR8CZJSER7LBCEWLQRM9F8JCV9C/EDIT#GID = 0
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
尝试,在J12中
使用持续时间格式
Try, in J12
then apply duration format

尝试:
更新
改进版本:
src =“ https://i.sstatic.net/mltvxced.png” alt =“在此处输入图像说明”>
try:
update
improved version:
使用
Regexextract()
,如下:公式提供文本字符串。要获取数字持续时间,请使用
value()
,例如:格式列为 format>数字>持续时间。
如果您要转换的文本字符串中有许多组件,则仅使用一个
regextextract()
可能是有益的,可以使用最近引入的lambda函数:请参见 this Answer 以说明日期和时间值在电子表格中的工作方式。
Use
regexextract()
, like this:The formula gives text strings. To get numeric durations, use
value()
, like this:Format the result column as Format > Number > Duration.
In the event there are many components in the text string you are converting, it may be beneficial to use just one
regextextract()
, which is possible using the recently introduced lambda functions:See this answer for an explanation of how date and time values work in spreadsheets.
带有Regextract的TimeValue
此方法利用时间值函数,而不是除以几天的分数。
假设您的时间文本字符串在A列中:
说明
r
中,r
使用RegeXextract从字符串中返回lambda的公式首次返回(用LEN进行测试),并将结果添加到TimeValue函数中。t
中,lambda的公式使用regexextract返回由r
从t
界定的数字,如果找不到t
,则IFNA返回0。:
用作TimeValue的time_string
参数,该参数已添加到步骤#中计算的总天数2上面。您可以将结果值编号为持续时间。
TIMEVALUE w/ REGEXEXTRACT
This approach leverages the TIMEVALUE function instead of dividing by fractions of days.
Assuming your time text strings are in Column A:
Explanation
r
r
is populated (tested with LEN) the LAMBDA's formula first returns any days from the string using REGEXEXTRACT and adds that result to a TIMEVALUE function.t
r
that's delimited byt
, and IFNA returns 0 ift
is not found.:
which is used as TIMEVALUE'stime_string
argument which is added to the total days calculated in Step #2 above.You can number format the resulting values as duration.