将 IMPORTXML 函数输出格式化为时间"h:mm"



我在Google表格中有一个函数,可以计算两个位置之间的行驶距离:

=IMPORTXML("https://maps.googleapis.com/maps/api/distancematrix/xml?&origins="& A20 & "&destinations=" & B20 & "&mode=driving&key=mykey"; "//duration/text")

这有效,单元格中的值格式化为4 hours 33 mins

我如何将其格式化为4:33

将公式(假设在 A1 中(包装如下:

=substitute(substitute(A1," hours ",":")," mins",)

最新更新