将时间等分 [英] Dividing the time in equal intervals
本文介绍了将时间等分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在折线图中,我以编程方式(宏观)针对时间绘制了某些值以进行调查.
调查中的小时数始终不相同.为了以相等的间隔划分x轴(时间),
In a line graph I plot certain values against time programatically(Macro)for a survey.
The number of hours in a survey are not same always. In order to divide the x-axis (time) in equal intervals,
Eg: The time is starts from 00:00:00 to 19:00:00.
TotalTime = FinalTime - InitialTime
TotalTime = 19:00:00 - 00:00:00
TotalTime = 19:00:00
但是在我得到的新数据集中,调查连续进行了2/3天.
因此,现在要检查总小时数,减去最终值和初始值后,结果值只有几个小时.
例如:
But in a new data set I got, the survey runs for 2 / 3 days continuously.
So now to check the total number of hours, when the final and initial values are subtracted, the resulting value is only few hours.
ex:
Start Time = 01:00:00(Day1), End Time = 07:00:00(Day2)
The result is 06:00:00
,但这是不正确的
需要一些建议
but this is incorrect
Need some suggestions please
推荐答案
为什么您不考虑经过的日期或天数.您可以使用公式
(FinalTime-InitialTime)+(DayDiff * 24)
例如01:00:00(第1天)和07:00:00(第2天),然后
6 + 24 = 30小时.
Why don''t you consider the date or days elapsed. You can use the formula
(FinalTime - InitialTime) + (DayDiff * 24)
e.g. 01:00:00 (day1) and 07:00:00 (day2), then
6 + 24 = 30 hrs.
这篇关于将时间等分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文