工作时间DURATION,而不是时间 [英] Working with time DURATION, not time of day

查看:131
本文介绍了工作时间DURATION,而不是时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在做一些基准测试,我想使用Excel来生成结果图。我有一个简单但令人讨厌的问题,正在烘烤我的面条。

I'm doing some benchmarking, and I want to use Excel to produce graphs of the results. I've got a simple but annoying problem which is baking my noodle.

问题是,Excel 坚持认为时间是指一个时间的一天。它拒绝让我与时间持续时间一起工作。当我尝试说三分六秒时,它将这个错误地解释为午夜三分六秒,这不是我的意思。

The problem is that Excel insists that "time" means a time of day. It refuses to let me work with time durations. When I try to say "three minutes and six seconds", it misinterprets this as "three minutes and six seconds past midnight", which isn't what I meant at all.

我可以通过费力地将所有内容转换为几秒钟来解决问题。但是,所有的图表都标注了几秒钟,而不是分秒和秒。此外,不得不继续输入 = 3 * 60 + 6 而不仅仅是 3:06 。一旦我完成了,我必须看公式来检查我是否正确输入了数据[并且没有解决公式]。

I can work around the problem by laboriously converting everything to seconds. But then all my graphs are labelled in seconds, not minutes and seconds. Plus it's a pain to have to keep typing in =3*60+6 rather than just 3:06. And once I've done it, I have to look at the formula to check whether I entered the data correctly [and didn't screw up the formula].

任何人都知道如何使Excel工作的时间不会固定在一天的特定时间?

Does anybody know how I can make Excel work with a time duration not anchored to a specific time of day?

推荐答案

您可以使用正常的时间数据类型轻松执行此操作 - 只需更改格式!

You can easily do this with the normal "Time" data type - just change the format!

Excel时间/日期格式只是1.0等于1整天从1/19/1900开始)。所以36个小时会是1.5。如果将格式更改为 [h]:mm ,您将看到 36:00

Excels time/date format is simply 1.0 equals 1 full day (starting on 1/1/1900). So 36 hours would be 1.5. If you change the format to [h]:mm, you'll see 36:00.

因此,如果要使用持续时间,您可以简单地使用减法,例如

Therefore, if you want to work with durations, you can simply use subtraction, e.g.

A1: Start:           36:00 (=1.5)
A2: End:             60:00 (=2.5) 
A3: Duration: =A2-A1 24:00 (=1.0)

这篇关于工作时间DURATION,而不是时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆