如何将MM:SS的持续时间转换为Google表中的几秒钟?
作为任务的持续时间,假设我们有一个格式为mm:ss
的列,该列需要转换为秒。从数学上讲,解决方案很简单。我们只需要计算mm * 60 + ss
将其转换为秒即可。此外,我们遵循 this 解决问题的策略。但是,解决的直接方法仍然是一个问题。
直接做的方法是什么?
As duration of a task, suppose that we have a column with cells formatted as MM:SS
that would like to convert to seconds. Mathematically speaking, the solution is simple. We just need to compute MM * 60 + SS
converting it to seconds. Additionally, we followed this strategy to solve the problem. However, the direct way to solve it remains a question.
What is the direct way to do it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
我按时间函数使用部门。要获取秒数,您只需将持续时间除以
时间(0,0,1)
即可。这是我如何使用

time()
:D,E和F列来自我为员工使用的Google表格。我通过减去开始时间和结束时间来计算G,然后减去午餐时间。这是我第一次使用时间函数。 G的数据格式为
持续时间
。在此示例中,H列是一个简单的数字。每个人都得到公平的报酬;没有人每小时工作$ 10。实际上,此列从另一张纸上拉出。最后,我是每小时工作时间的时间。
使用
time()
函数对我真的很有帮助。I use division by the TIME function. To get the number of seconds, you can simply divide your duration by
TIME(0,0,1)
.Here is an example of how I use

TIME()
:Columns D, E, and F come from a Google Form I use for my employees. I calculate G by subtracting the beginning and end times and then subtracting the lunch minutes. This is my first use of the TIME function. The data format for G is
Duration
.The H column is an easy number in this example. Everyone is paid fairly; no one works for $10/hour. In reality, this column pulls from another sheet. Lastly, I is the number of hours worked times dollars per hour.
Using the
TIME()
function is really helpful for me.如果有人想要一个更直观的答案,请将其放在这里。
这抓住了分钟列和第二列,并将分钟列乘以六十。如果需要,这也可以使用数小时,系数为60*60或3600。
希望这很有帮助!
Putting this on here if anyone wants a more intuitive answer.
This grabs the minute column and the second column and multiplies the minute column by sixty. This could also be done for hours if desired, and the coefficient would be 60*60, or 3600.
Hope this is helpful!
使用:
use:
所有值都存储为天数。 1是一天。因此,获得秒数的直接方法是每天乘以24小时,60分钟/小时60秒/分钟。例如,持续1分钟:
基础格式始终为
hh:mm:ss
。对于mm:SS
,将因子减少60:注意:这有效,因为几分钟内的1小时等于1分钟。但是
01:01
默认情况下,由Google考虑1小时1分钟。All values are stored as days. 1 is one day. So the direct way to get seconds is just multiply by 24 hours/day, 60 minutes/hour and 60 seconds/minute. For eg, for 1 minute:
The underlying format is always
HH:MM:SS
. ForMM:SS
, reduce the factor by 60:Note: This works because 1 hour in minutes is equal to 1 minute in seconds. But
01:01
by default, is considered 1 hour and 1 minutes by Google.您有小时:分钟,想将其转换为总数几秒钟?
答案是将时间值(一整天增量)乘以24(每天),然后又增加60(每小时分钟),最后60(每分钟每分钟)。这是假设时间以Excel时间格式存储(我将时间格式与对话框中的37小时示例一起使用,然后从自定义字符串中删除秒)。
示例
You have hours:minutes and want to convert it to just be total seconds?
The answer is to multiply the time value (which is whole day increments) by 24 (hours per day), then by 60 (minutes per hour) and finally 60 again (seconds per minute). This assumes the times are stored in Excel time formatting (I use the time format with the 37 hours example in the dialog box, then removed the seconds from the custom string).
Example